This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Re: vector<>.begin()
- From: Jeff Williams <jwilliams at mfchelp dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 7 Nov 2003 9:39:31 -0500
- Subject: Re: Re: vector<>.begin()
>
> From: Gabriel Dos Reis <gdr@integrable-solutions.net>
> Date: 2003/11/07 Fri AM 09:29:54 EST
> To: Jeff Williams <jwilliams@mfchelp.com>
> CC: <libstdc++@gcc.gnu.org>
> Subject: Re: vector<>.begin()
>
> Jeff Williams <jwilliams@mfchelp.com> writes:
>
> | So, for starters I realize I am not some super genius who is the
> | only one to think of this, therefore, I have to ask, why is this
> | conversion operator not included already?
>
> The idea behind vector<T>::iterator not being a pointer is precisely
> to improve type-safety, I don't see the point of adding an implicit
> convertion; it is a recipe for potential bomb for user codes.
>
> | And secondly, is it a bad
> | idea for me to put it in there even if "you all" decide not to
> | include such a change? Aside from the fact that I'll have to keep
> | adding it each time a new version comes out...
>
> Whether it is a bad idea depends on your uses of it. Certainly it
> would not be a good idea for V3.
>
Ok, I see your point there. Perhaps then what I will do is leave my "custom" modification in there and slowly convert my code to &*begin(), adding such a conversion speed up my transition from STLport to libstdc++, thanks for the answer.