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: 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.

-- Gaby


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