Topic: Does swap on vectors provide the strong guarantee?
Author: restor <akrzemi1@interia.pl>
Date: Tue, 9 Jun 2009 18:04:58 CST Raw View
Hi,
I am looking at the latest draft (N2857) and cannot find the place
that would require of swap specialization for vectors to provide the
strong exception safety guarantee. The copy-and-swap idiom implies
that such a guarantee would exist. Does it exist then? And if so,
could someone point me to the place?
Regards,
&rzej
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: James Hopkin <tasjaevan@gmail.com>
Date: Thu, 11 Jun 2009 10:25:13 CST Raw View
On Jun 10, 1:04 am, restor <akrze...@interia.pl> wrote:
> Hi,
> I am looking at the latest draft (N2857) and cannot find the place
> that would require of swap specialization for vectors to provide the
> strong exception safety guarantee. The copy-and-swap idiom implies
> that such a guarantee would exist. Does it exist then? And if so,
> could someone point me to the place?
>
It doesn't have the strong guarantee, it has the 'no throw' guarantee.
23.2.1/10
James
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: restor <akrzemi1@gmail.com>
Date: Thu, 11 Jun 2009 11:49:06 CST Raw View
> I am looking at the latest draft (N2857) and cannot find the place
> that would require of swap specialization for vectors to provide the
> strong exception safety guarantee.
Sorry, I meant swap on vectors providing no-throw guarantee. I found
it in 23.2.1 (General Concept Requirements).
Regards,
&rzej
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]