This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: vector<>.begin()
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Jeff Williams <jwilliams at mfchelp dot com>
- Cc: <libstdc++ at gcc dot gnu dot org>
- Date: 07 Nov 2003 15:29:54 +0100
- Subject: Re: vector<>.begin()
- Organization: Integrable Solutions
- References: <20031107141753.MQQV1539.fep01.biz.rr.com@[127.0.0.1]>
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.
-- Gaby