|Anonymous | Login||2019-10-19 00:45 UTC|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000384||CEGUI||Core library (CEGUIBase)||public||2010-08-20 09:12||2010-10-04 12:54|
|Product Version||Mercurial: default branch|
|Target Version||0.7.3||Fixed in Version||Mercurial: default branch|
|Summary||0000384: String::iterator::operator*() returns a const reference|
*s.begin() = 98;
The above code gives a compiler error about assigning to a const variable (in MSVC2008). Took me some time to figure out what was going on because iterator::operator*() clearly returns "reference". But it doesn't actually mean String::reference, but std::iterator<>::reference, which is const, because its typedeffed from the template parameters given in String::const_iterator.
All the other types used in the iterator classes need to be checked too. I think at least "pointer" has the same issue.
|Tags||No tags attached.|
Should be fixed in branches/v0-7 r2635.
The return types are correct and behave the same as std::string::iterator, which was one of the goals for CEGUI::String (and it's iterators).
The issues here were actually due to String::iterator subclassing String::const_iterator, and so it was impossible to actually get an iterator that could work in a non-const manner.
|2010-08-20 09:12||Timo||New Issue|
|2010-08-23 06:50||CrazyEddie||Target Version||0.8.3 => 0.7.3|
|2010-08-26 11:00||CrazyEddie||Status||new => acknowledged|
|2010-09-29 09:51||CrazyEddie||Status||acknowledged => assigned|
|2010-09-29 09:51||CrazyEddie||Assigned To||=> CrazyEddie|
|2010-09-30 11:12||CrazyEddie||Status||assigned => confirmed|
|2010-10-04 12:54||CrazyEddie||Note Added: 0000496|
|2010-10-04 12:54||CrazyEddie||Status||confirmed => resolved|
|2010-10-04 12:54||CrazyEddie||Fixed in Version||0.8.3 => Mercurial: default branch|
|2010-10-04 12:54||CrazyEddie||Resolution||open => fixed|
|Copyright © 2000 - 2012 MantisBT Group|