This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]