*begin() and *end() methods on c++0x containers

Paolo Carlini paolo.carlini@oracle.com
Thu May 29 16:30:00 GMT 2008


A few comments,

...but really, as should be clear by now, you should trust a little more 
the implementation effort, or, alternately, submit  well thought and 
tested patches ;)
> IMHO there's some issues in the implementation of the iterator 
> accessors of some containers in trunk (and gcc-4.3.0) version of 
> libstdc++.
>
> std::string: c++0x's cbegin, cend, crbegin and crend are missing
On purpose. For now we are not fiddling with the current implementation 
of basic_string, which will change rather drastically for the next ABI. 
You will find che c* member in ext/vstring.h.
> std::set: begin() and end() are const qualified members, whereas in 
> current C++0x draft they're not cv-qualified. Maybe this is a 
> libstdc++'s implementation detail because you're not supposed to 
> modify the iterator's pointee? But the interface in the draft is 
> clear, the function isn't cv-qualified...
As fas as I can see, the current C++0x draft (n2606) is identical to 
C++03 here, and indeed, this is an implementation detail, if I remember 
correctly. See also the comment about DR 103. In any case, not a C++0x 
proper issue.

Paolo.



More information about the Libstdc++ mailing list