gcc/libstdc++-v3/include
Jeffrey Yasskin 2fc9b37dd0 Fix PR52822 (stable_partition move-assigns object to itself) by scanning for...
Fix PR52822 (stable_partition move-assigns object to itself) by
scanning for the first value that doesn't match the predicate before
starting to rearrange values.

2012-04-03   Jeffrey Yasskin  <jyasskin@google.com>

	PR libstdc++/52822
	* include/bits/stl_algo.h (__find_if_not): Expose in
	C++98 mode.
	(__find_if_not_n): Like __find_if_not, but works on and updates a
	counted range instead of a bounded range.
	(stable_partition): Guarantee !__pred(*__first) in call to
	__stable_partition_adaptive() or __inplace_stable_partition().
	(__stable_partition_adaptive): Use new precondition to avoid
	moving/copying objects onto themselves.  Guarantee new
	precondition to recursive calls.
	(__inplace_stable_partition): Use new precondition to simplify
	base case, remove __last parameter.  Guarantee new precondition to
	recursive calls.
	* testsuite/25_algorithms/stable_partition/moveable.cc (test02):
	Test a sequence that starts with a value matching the predicate.
	* testsuite/25_algorithms/stable_partition/pr52822.cc:
	Test vectors, which have a destructive self-move-assignment.

From-SVN: r186391
2012-04-12 20:59:09 +00:00
..
backward binders.h: Fix examples in doxygen comments and suggest using std::bind instead. 2011-11-20 21:14:56 +00:00
bits Fix PR52822 (stable_partition move-assigns object to itself) by scanning for... 2012-04-12 20:59:09 +00:00
c PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
c_compatibility PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
c_global Remove obsolete Solaris 8 support 2012-03-14 17:08:03 +00:00
c_std cstdio: Remove extraneous extern. 2012-03-02 16:44:50 +00:00
debug forward_list.h (splice_after(const_iterator, forward_list&), [...]): Add per C++11 as published (and LWG 1310). 2012-04-11 17:31:57 +00:00
decimal PR libstdc++/36104 part four 2011-01-30 22:39:36 +00:00
ext re PR libstdc++/52942 (using std::ref with a std::unordered_map fails to compile) 2012-04-12 12:18:06 +00:00
parallel PR libstdc++/51798 continued 2012-02-13 13:30:31 -08:00
precompiled stdc++.h: Add cstdalign. 2011-11-08 01:02:06 +00:00
profile PR libstdc++/52317 (cont) 2012-02-21 21:30:26 +00:00
std functional (__callable_functor): Overload for volatile-qualified pointers. 2012-04-01 18:10:57 +01:00
tr1 Remove obsolete Solaris 8 support 2012-03-14 17:08:03 +00:00
tr2 type_traits (typelist): To __reflection_typelist. 2012-03-02 05:54:24 +00:00
Makefile.am [multiple changes] 2012-03-19 23:48:16 +00:00
Makefile.in [multiple changes] 2012-03-19 23:48:16 +00:00