This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: *begin() and *end() methods on c++0x containers
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Rodolfo Lima <rodolfo at rodsoft dot org>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 29 May 2008 18:12:39 +0200
- Subject: Re: *begin() and *end() methods on c++0x containers
- References: <g118o6$6ph$1@ger.gmane.org>
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.