Article View: comp.std.c++
Article #3046STL experts, please comment
From: David Byrden
Date: Fri, 19 Jan 1996 17:32
Date: Fri, 19 Jan 1996 17:32
29 lines
1653 bytes
1653 bytes
I'm trying to define an allocator and I have run into a problem.
In the HP STL, deque::iterator has a default ctor which initialises
several of its members with the value 0
iterator() : current(0), first(0), last(0), node(0) {}
These members have the type deque::pointer, which is a typedef
for the pointer in deque's allocator.
An allocator pointer, according to the standard, has exactly the same
semantics as a random access iterator.
I can find no place where it says that all random access iterators
should be constructable from the int value zero, neither in
documentation from the time of the HP STL, nor the latest draft standard.
So, this ctor seems to break the rules. Yet it was written by the
inventors of STL.
Any contributions?
David
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4dnteb$6fo@news.bridge.net>Path:
arc1-ca.pugleaf.net!fido.asd.sgi.com!austernShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern From: David Byrden <100101.2547@compuserve.com> Newsgroups: comp.std.c++ Subject: STL experts, please comment Date: 19 Jan 1996 09:32:09 PST Organization: self-employed Approved: austern@isolde.mti.sgi.com Message-ID: <4dnteb$6fo@news.bridge.net> NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: 19 Jan 1996 10:57:15 GMT X-Mailer: Mozilla 1.1N (Windows; I; 16bit) X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMP/VpUy4NqrwXLNJAQHFXgH7BGw0o9j8b5usu698YCJU10gRtMGy62Wf mhWf02bkqf2wYlNlWFSmRPMQbFGBNHo5NPmq+fbq1tK3Ymfde2MU5g== =qvZT Originator: austern@isolde.mti.sgi.com