Topic: string and push_back ?
Author: Ahn Ki-yung <kyagrd@chiak.kaist.ac.kr>
Date: 2000/01/13 Raw View
Darin Adler wrote:
> In article <387B169B.355D4774@daidun.kaist.ac.kr>, Ahn Ki-yung
> <kyagrd@chiak.kaist.ac.kr> wrote:
>
> > Is push_back, and pop_back member of basic_string ?
>
> push_back: Yes.
>From the answers in this newsgroup and reply from Dr.Stroustrup
I got this now, but ...
> pop_back: No.
Is this true ???
Isn't it natural to design them go together ?
If it is true can sombody explain why pop_back was excuded
as a member of basic_string ?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: jpotter@falcon.lhup.edu (John Potter)
Date: 2000/01/13 Raw View
On Thu, 13 Jan 2000 22:54:28 CST, Ahn Ki-yung <kyagrd@chiak.kaist.ac.kr>
wrote:
: Darin Adler wrote:
:
: > In article <387B169B.355D4774@daidun.kaist.ac.kr>, Ahn Ki-yung
: > <kyagrd@chiak.kaist.ac.kr> wrote:
: >
: > > Is push_back, and pop_back member of basic_string ?
: >
: > push_back: Yes.
:
: >From the answers in this newsgroup and reply from Dr.Stroustrup
: I got this now, but ...
:
:
: > pop_back: No.
:
: Is this true ???
: Isn't it natural to design them go together ?
:
: If it is true can sombody explain why pop_back was excuded
: as a member of basic_string ?
Speculation on the reverse. Neither makes sense for string.
Push_back was included to allow back_inserter for use with
things like copy. There is no like need for pop_back.
John
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Ahn Ki-yung <kyagrd@chiak.kaist.ac.kr>
Date: 2000/01/11 Raw View
Is push_back, and pop_back member of basic_string ?
In The C++ Programming Language 3rd Edition,
Chapter 6 (p115) and Chapter 20 (p), there is an example
using push_back member of the string type
variable.
Is this Standard ?
Recent version of gcc and egcs doesnt support this
and can't find in CD2 either.
We are arguing in korean C++ newsgroup if this is
author's mistake, but unfortunately no person
who is arguing here purchaced the standard doucument
itself.
p.s.
hope to see the special edition soon :-)
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Darin Adler <darin@bentspoon.com>
Date: 2000/01/11 Raw View
In article <387B169B.355D4774@daidun.kaist.ac.kr>, Ahn Ki-yung
<kyagrd@chiak.kaist.ac.kr> wrote:
> Is push_back, and pop_back member of basic_string ?
push_back: Yes.
pop_back: No.
> In The C++ Programming Language 3rd Edition,
> Chapter 6 (p115) and Chapter 20 (p), there is an example
> using push_back member of the string type
> variable.
>
> Is this Standard ?
Yes.
> We are arguing in korean C++ newsgroup if this is
> author's mistake, but unfortunately no person
> who is arguing here purchaced the standard doucument
> itself.
It's in the standard, in the synopsis in section 21.3/6. Due to an
oversight, it was left out of section 21.3.5.2. A defect report about
this omission was submitted back in 1997 and has been approved by the
library committee:
http://anubis.dkuug.dk/JTC1/SC22/WG21/docs/lwg-defects.html#7
-- Darin
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Fausto Fabbioni <fabbioni@freelance.it>
Date: 2000/01/12 Raw View
In the ISO 1998 C++ standard document was point out the following line
void push_back(const charT); (page 385)
It is included only on Rogue Wave commercial libraries shipped with
Borland Builder and HP aC++.
It seems a print mistake.
Sorry for my bad english.
Fausto
Ahn Ki-yung wrote:
>
> Is push_back, and pop_back member of basic_string ?
>
> In The C++ Programming Language 3rd Edition,
> Chapter 6 (p115) and Chapter 20 (p), there is an example
> using push_back member of the string type
> variable.
>
> Is this Standard ?
>
> Recent version of gcc and egcs doesnt support this
> and can't find in CD2 either.
>
> We are arguing in korean C++ newsgroup if this is
> author's mistake, but unfortunately no person
> who is arguing here purchaced the standard doucument
> itself.
>
> p.s.
> hope to see the special edition soon :-)
>
> [ comp.std.c++ is moderated. To submit articles, try just posting with ]
> [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
> [ --- Please see the FAQ before posting. --- ]
> [ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]