Topic: Norm sttring::insert


Author: AlbertoBarbati@libero.it (Alberto Barbati)
Date: Tue, 30 Nov 2004 03:45:23 GMT
Raw View
David wrote:
> Hi,
> I've got a little question/problem about norm 21.3.5.5

It's 21.3.5.4.

>
> for template<class InputIterator>
>   void insert(iterator p, InputIterator first, InputIterator last)
>
> paragraph 16, norm say that this function returns
> insert(p, basic_string<charT, traits, Allocator>(first, last))
>
> but I cannot see any overloaded insert member function that take an
> iterator and a basic_string.
> the one thats suits the most
> is insert(size_type, const basic_string<charT, traits, Allocator>& )
>
> does we must understand it returns
> insert(p-begin(), basic_string<charT, traits, Allocator>(first, last))

You are referring to the 1998 version of the standard. The paragraph has
been corrected in the 2003 version (TC1) and in fact it reads:

"Equivalent to insert(p - begin(), basic_string(first, last))."

Alberto

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dreversa@libertysurf.fr (David)
Date: Wed, 1 Dec 2004 20:19:23 GMT
Raw View
AlbertoBarbati@libero.it (Alberto Barbati) wrote in message news:<bbKqd.57078$Ni.1965073@twister1.libero.it>...
> David wrote:
> > Hi,
> > I've got a little question/problem about norm 21.3.5.5
>
> It's 21.3.5.4.
>
> >
> > for template<class InputIterator>
> >   void insert(iterator p, InputIterator first, InputIterator last)
> >
> > paragraph 16, norm say that this function returns
> > insert(p, basic_string<charT, traits, Allocator>(first, last))
> >
> > but I cannot see any overloaded insert member function that take an
> > iterator and a basic_string.
> > the one thats suits the most
> > is insert(size_type, const basic_string<charT, traits, Allocator>& )
> >
> > does we must understand it returns
> > insert(p-begin(), basic_string<charT, traits, Allocator>(first, last))
>
> You are referring to the 1998 version of the standard. The paragraph has
> been corrected in the 2003 version (TC1) and in fact it reads:
>
> "Equivalent to insert(p - begin(), basic_string(first, last))."
>
> Alberto
>
> ---
> [ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]

Thanks
David

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dreversa@libertysurf.fr (David)
Date: Mon, 29 Nov 2004 17:58:55 GMT
Raw View
Hi,
I've got a little question/problem about norm 21.3.5.5

for template<class InputIterator>
  void insert(iterator p, InputIterator first, InputIterator last)

paragraph 16, norm say that this function returns
insert(p, basic_string<charT, traits, Allocator>(first, last))

but I cannot see any overloaded insert member function that take an
iterator and a basic_string.
the one thats suits the most
is insert(size_type, const basic_string<charT, traits, Allocator>& )

does we must understand it returns
insert(p-begin(), basic_string<charT, traits, Allocator>(first, last))
?

Thanks

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]