Commit Graph

4240 Commits

Author SHA1 Message Date
François Dumont
cfca3f7267 hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
2011-05-11  François Dumont  <francois.cppdevs@free.fr>

        * include/ext/pb_ds/detail/resize_policy/
        hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace
        _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
        * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
        find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
        constructors_destructor_fn_imps.hpp, split_join_fn_imps.hpp
        (PB_DS_ASSERT_VALID): Rename in PB_DS_ASSERT_VALID_COND.
        * include/ext/pb_ds/detail/debug_map_base.hpp,
        splay_tree_/splay_tree_.hpp, ov_tree_map_/ov_tree_map_.hpp,
        cc_hash_table_map_/cc_ht_map_.hpp, pat_trie_/pat_trie_.hpp,
        leaf.hpp, internal_node.hpp, gp_hash_table_map_/gp_ht_map_.hpp,
        bin_search_tree_/bin_search_tree_.hpp, list_update_map_/lu_map_.hpp,
        rb_tree_map_/rb_tree_.hpp (PB_DS_ASSERT_VALID, PB_DS_DEBUG_VERIFY,
        PB_DS_CHECK_KEY_EXISTS, PB_DS_CHECK_KEY_DOES_NOT_EXIST): Duplicate
        macro definitions move...
        * include/ext/pb_ds/detail/container_base_dispatch.hpp: ... here...
        * include/ext/pb_ds/detail/basic_tree_policy/traits.hpp: ... and here.
        * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp,
        resize_policy.hpp, pairing_heap_/pairing_heap_.hpp,
        left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp,
        binomial_heap_/binomial_heap_.hpp, thin_heap_/thin_heap_.hpp,
        rc_binomial_heap_/rc_binomial_heap_.hpp, rc.hpp (PB_DS_ASSERT_VALID,
        PB_DS_DEBUG_VERIFY): Duplicate macro definitions move...
        * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
        ...here.

From-SVN: r173670
2011-05-11 19:29:02 +00:00
Paolo Carlini
b04fa73811 re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48933
	* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
	erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
	llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
	nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
	scalbn, tgamma, trunc): Use __enable_if on the return type.
	* include/tr1/cmath: Likewise.
	* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
	* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.

From-SVN: r173574
2011-05-09 15:38:21 +00:00
François Dumont
f5886803ed macro.h (_GLIBCXX_DEBUG_VERIFY_AT): New.
2011-05-07  François Dumont  <francois.cppdevs@free.fr>

	* include/debug/macro.h (_GLIBCXX_DEBUG_VERIFY_AT): New.
	(_GLICXX_DEBUG_VERIFY): Use latter.
	* include/ext/pb_ds/detail/resize_policy/
	hash_load_check_resize_trigger_imp.hpp: Emit assertion on the line
	containing the original assert call.
	* include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	erase_store_hash_fn_imps.hpp, insert_no_store_hash_fn_imps.hpp,
	find_fn_imps.hpp, insert_store_hash_fn_imps.hpp, debug_fn_imps.hpp,
	debug_no_store_hash_fn_imps.hpp, cc_ht_map_.hpp, resize_fn_imps.hpp,
	constructor_destructor_fn_imps.hpp, debug_store_hash_fn_imps.hpp,
	erase_no_store_hash_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp,
	insert_join_fn_imps.hpp, pat_trie_/head.hpp, debug_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, pat_trie_.hpp, split_fn_imps.hpp,
	leaf.hpp, erase_fn_imps.hpp, node_base.hpp, internal_node.hpp:
	Likewise.
	* include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp,
	r_erase_fn_imps.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, rotate_fn_imps.hpp, erase_fn_imps.hpp,
	bin_search_tree_.hpp, insert_fn_imps.hpp, split_join_fn_imps.hpp:
	Likewise.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	erase_store_hash_fn_imps.hpp, insert_no_store_hash_fn_imps.hpp,
	find_fn_imps.hpp, gp_ht_map_.hpp, insert_store_hash_fn_imps.hpp,
	debug_fn_imps.hpp, erase_fn_imps.hpp, debug_no_store_hash_fn_imps.hpp,
	resize_fn_imps.hpp, constructor_destructor_fn_imps.hpp,
	debug_store_hash_fn_imps.hpp, erase_no_store_hash_fn_imps.hpp:
	Likewise.
	* include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	erase_fn_imps.hpp, insert_fn_imps.hpp, binary_heap_.hpp,
	resize_policy.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	pairing_heap_.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/binomial_heap_/
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	binomial_heap_.hpp: Likewise.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	erase_fn_imps.hpp, left_child_next_sibling_heap_.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp,
	find_fn_imps.hpp, thin_heap_.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp,
	ov_tree_map_.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, split_join_fn_imps.hpp, info_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/debug_map_base.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	splay_fn_imps.hpp, split_join_fn_imps.hpp, splay_tree_.hpp: Likewise.
	* include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp,
	find_fn_imps.hpp, lu_map_.hpp, constructor_destructor_fn_imps.hpp,
	insert_fn_imps.hpp, debug_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp,
	rc_binomial_heap_.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp, rc.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp,
	insert_fn_imps.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, rb_tree_.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/hash_policy.hpp: Likewise.

From-SVN: r173529
2011-05-07 13:45:24 +00:00
Marc Glisse
91e4938b8c PR libstdc++/47913 (again)
2011-05-04  Marc Glisse  <marc.glisse@normalesup.org>

	PR libstdc++/47913 (again)
	* include/std/ratio (ratio_add, ratio_less): Rewrite.
	* testsuite/20_util/ratio/operations/47913.cc: Extend.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.

From-SVN: r173400
2011-05-04 23:23:54 +00:00
Paolo Carlini
8a3cabe30f re PR libstdc++/48848 ([C++0x] std::valarray<T> functions missing)
2011-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48848
	* include/std/valarray (valarray<>::valarray(valarray&&),
	valarray<>::operator=(valarray&&), valarray<>::swap): Add.
	* doc/xml/manual/status_cxx200x.xml: Update.
	* testsuite/26_numerics/valarray/moveable.cc: New.
	* testsuite/26_numerics/valarray/swap.cc: Likewise.

From-SVN: r173344
2011-05-03 22:25:24 +00:00
Paolo Carlini
0ecca7a6a6 re PR libstdc++/48750 (for_each_template_random_access_ed has unbalanced new/delete[])
2011-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48750
	* include/parallel/multiway_merge.h: Run _ValueType destructors.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/quicksort.h: Likewise.
	* include/parallel/random_shuffle.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/losertree.h: Run destructors; minor tweaks.
	* include/parallel/par_loop.h: Run destructors, fix memory
	allocations and deallocations.
	* testsuite/26_numerics/accumulate/48750.cc: New.

	* testsuite/ext/profile/mutex_extensions_neg.cc: Do not run in
	parallel-mode to avoid spurious multiple errors.

From-SVN: r173309
2011-05-03 14:20:45 +00:00
Jonathan Wakely
0f88da8d14 functional (bind): Remove from overload set when first argument type might be a socket file descriptor.
2011-05-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/functional (bind): Remove from overload set when first
	argument type might be a socket file descriptor.
	* testsuite/20_util/bind/socket.cc: New.

From-SVN: r173279
2011-05-03 01:03:38 +01:00
Ollie Wild
95c952c532 sso_string_base.h (__sso_string_base<>::_M_construct): Fix unqualified lookup.
* include/ext/sso_string_base.h (__sso_string_base<>::_M_construct):
	Fix unqualified lookup.
	(__sso_string_base<>::_M_construct): Likewise.
	(__sso_string_base<>::_M_construct): Likewise.
	(__sso_string_base<>::_M_assign): Likewise.
	(__sso_string_base<>::_M_reserve): Likewise.
	(__sso_string_base<>::_M_mutate): Likewise.
	(__sso_string_base<>::_M_erase): Likewise.
	* include/ext/vstring.h (__versa_string<>::replace): Likewise.
	(__versa_string<>::compare): Likewise.
	* include/ext/vstring.tcc (__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.

From-SVN: r173257
2011-05-02 16:25:14 +00:00
Paolo Carlini
2c7a09d774 [multiple changes]
2011-04-30  Daniel Krugler  <daniel.kruegler@googlemail.com>

	* include/std/type_traits (__is_default_constructible_atom,
	__is_default_constructible_safe<, true>,
	__is_direct_constructible_new_safe,
	__is_base_to_derived_ref<,, true>, __is_lvalue_to_rvalue_ref<,, true>,
	__is_direct_constructible_ref_cast, __is_direct_constructible,
	__is_nary_constructible): Simplify; add comments throughout.

2011-04-30  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r173222
2011-04-30 19:40:06 +00:00
Doug Kwan
d5e8e6a873 Makefile.am (install-freestanding-headers): Also install cxxabi_tweaks.h.
2011-04-30  Doug Kwan  <dougkwan@google.com>

	* include/Makefile.am (install-freestanding-headers): Also install
	cxxabi_tweaks.h.
	* include/Makefile.in: Regenerate.

From-SVN: r173220
2011-04-30 16:26:23 +00:00
Paolo Carlini
df9cb15f7a 2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
Revert unintended changes to include/parallel files.

From-SVN: r173066
2011-04-28 10:55:56 +00:00
Paolo Carlini
9f1163b171 re PR libstdc++/48760 (std::complex constructor buggy in the face of NaN's)
2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48760
	* include/std/complex (complex<float>::complex(float, float),
	complex<double>::complex(double, double),
	complex<long double>::complex(long double, long double)): Use
	list-initialization in C++0x mode, initialize in the body in
	C++03 mode.
	* testsuite/26_numerics/complex/cons/48760.cc: New.
	* testsuite/26_numerics/complex/cons/48760_c++0x.cc: Likewise.

2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/bitset (_Base_bitset(unsigned long long)): Minor
	tweak, remove redundant round braces.

From-SVN: r173065
2011-04-28 10:52:17 +00:00
Paolo Carlini
1f428429c4 move.h (move_if_noexcept): Add.
2011-04-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/move.h (move_if_noexcept): Add.
	* testsuite/20_util/move_if_noexcept/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/move_if_noexcept/1.cc: Likewise.

From-SVN: r173044
2011-04-27 18:37:32 +00:00
Paolo Carlini
a47407f631 type_traits (struct underlying_type): Add.
2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (struct underlying_type): Add.
	* testsuite/20_util/underlying_type/requirements/typedefs-1.cc: New.
	* testsuite/20_util/underlying_type/requirements/typedefs-2.cc:
	Likewise.
	* testsuite/20_util/underlying_type/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line number.

From-SVN: r172944
2011-04-25 23:04:16 +00:00
Paolo Carlini
6b77089f40 multiway_merge.h: Uglify equally_split and equally_split_point throughout.
2011-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/parallel/multiway_merge.h: Uglify equally_split
	and equally_split_point throughout.
	* include/parallel/par_loop.h: Likewise.
	* include/parallel/equally_split.h: Likewise.
	* include/parallel/set_operations.h: Likewise.
	* include/parallel/unique_copy.h: Likewise.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/search.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/find.h: Likewise.

From-SVN: r172923
2011-04-24 23:51:49 +00:00
Jonathan Wakely
be7f782278 re PR libstdc++/48521 ([C++0x] std::result_of doesn't work with pointer to member)
2011-04-19  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48521
	* include/std/type_traits (result_of): Handle pointer to member.
	* include/std/functional (__invoke): Likewise.
	(_Function_to_function_pointer): Remove.
	(_Reference_wrapper_base): Provide nested types independent of
	unary_function and binary_function.
	(reference_wrapper::operator()): DR 2017.
	(ref(const A&&), cref(const A&&): Define as deleted.
	* include/std/future (async): Simplify SFINAE and use result_of to
	support pointer to member.
	* testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to 
	member.
	* testsuite/20_util/reference_wrapper/24803.cc: Likewise.
	* testsuite/20_util/reference_wrapper/typedefs.cc: Test for types
	instead of derivation from unary_function and binary_function.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/reference_wrapper/invoke-2.cc: New.
	* testsuite/20_util/reference_wrapper/ref_neg.c: New.
	* testsuite/20_util/reference_wrapper/typedefs-3.c: New.

From-SVN: r172709
2011-04-19 14:26:08 +01:00
Paolo Carlini
65cee9bdb7 type_traits (is_nothrow_default_constructible, [...]): Add.
2011-04-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (is_nothrow_default_constructible,
	is_nothrow_copy_constructible, is_nothrow_move_constructible,
	is_copy_constructible, is_move_constructible): Add.
	(has_nothrow_default_constructor, has_nothrow_copy_constructor):
	Remove.
	(is_nothrow_constructible): Adjust.

	* testsuite/util/testsuite_tr1.h (ThrowDefaultClass,
	ThrowCopyConsClass, ThrowMoveConsClass, NoexceptDefaultClass,
	ExceptDefaultClass, NoexceptCopyConsClass, ExceptCopyConsClass,
	NoexceptMoveConsClass, ExceptMoveConsClass): Add in C++0x mode.

	* testsuite/20_util/has_nothrow_default_constructor: Remove.
	* testsuite/20_util/has_nothrow_copy_constructor: Likewise.

	* testsuite/20_util/is_nothrow_move_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/value.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_move_constructible/value.cc: Likewise.
	* testsuite/20_util/is_move_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_move_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_copy_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_copy_constructible/requirements/
	explicit_instantiation.cc: Likewise.

	* testsuite/20_util/is_default_constructible/value.cc: Add tests.
	* testsuite/20_util/is_nothrow_constructible/value.cc: Likewise.

	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r172684
2011-04-19 00:10:53 +00:00
Daniel Krugler
da8111a024 PR libstdc++/48635 (again)
2011-04-17  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48635 (again)
	* include/bits/unique_ptr.h (unique_ptr<>::unique_ptr(unique_ptr<>&&),
	unique_ptr<_Tp[]>::unique_ptr(unique_ptr<>&&),
	unique_ptr<>::operator=(unique_ptr<>&&),
	unique_ptr<_Tp[]>::operator=(unique_ptr<>&&)): Use forward<_Ep>, not
	forward<_Dp>, to forward the deleter.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: New.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r172619
2011-04-17 21:46:11 +00:00
Daniel Krugler
d4610485cc re PR libstdc++/48631 ([C++0x] default_delete<T[]> accepts pointer conversions in function call operator)
2011-04-15  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48631
	* include/bits/unique_ptr.h (default_delete<_Tp[]>): Add deleted
	function call operator.
	* testsuite/20_util/default_delete/48631_neg.cc: New.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line numbers.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r172534
2011-04-16 02:02:29 +00:00
Daniel Krugler
2705a8d66e re PR libstdc++/48635 ([C++0x] unique_ptr<T, D&> moves the deleter instead of copying it)
2011-04-15  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48635
	* include/bits/unique_ptr.h (unique_ptr<>::operator=(unique_ptr&&),
	unique_ptr<>::operator=(unique_ptr<>&&),
	unique_ptr<_Tp[],>::operator=(unique_ptr&&),
	unique_ptr<_Tp[],>::operator=(unique_ptr<>&&)): Forward the deleter
	instead of moving it.
	* testsuite/20_util/unique_ptr/assign/48635.cc: New.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r172532
2011-04-16 00:55:43 +00:00
Paolo Carlini
b3b66298b8 istream: Fix comments in the light of DR60 + N3168.
2011-04-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/istream: Fix comments in the light of DR60 + N3168.

From-SVN: r172500
2011-04-15 16:18:22 +00:00
Paolo Carlini
123c516a9e [multiple changes]
2011-04-13  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48526
	* include/std/type_traits (struct is_constructible): Re-implement,
	according to n3290.
	(struct is_default_constructible): Add.
	(struct is_destructible): Likewise.
	(struct __and_, __or_, __not_): Add and use throughout; reorder some
	facilities, other minor tweaks.
	* testsuite/util/testsuite_tr1.h: Add test types.
	* testsuite/20_util/is_constructible/value-2.cc: New.
	* testsuite/20_util/is_default_constructible/value.cc: Likewise.
	* testsuite/20_util/is_default_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_default_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_destructible/value.cc: Likewise.
	* testsuite/20_util/is_destructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_destructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.

2011-04-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/is_function/value.cc: Add, adapted from the tr
	testsuite. 
	* testsuite/20_util/is_function/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_function/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_function/24808.cc: Likewise.
	* testsuite/20_util/is_function/35637.cc: Likewise.
	* testsuite/20_util/is_object/value.cc: Likewise.
	* testsuite/20_util/is_object/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_object/requirements/explicit_instantiation.cc:
	: Likewise.
	* testsuite/20_util/is_object/24808.cc: Likewise.
	* testsuite/20_util/is_compound/value.cc: Likewise.
	* testsuite/20_util/is_compound/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_compound/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_fundamental/value.cc: Likewise.
	* testsuite/20_util/is_fundamental/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_fundamental/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_pointer/requirements/typedefs.cc: 
	Likewise.
	* testsuite/20_util/is_member_pointer/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/
	requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/requirements/
	explicit_instantiation.cc: Likewise.

	* testsuite/20_util/is_convertible/value.cc: Minor tweak, adjust
	Copyright years.

From-SVN: r172401
2011-04-13 22:52:45 +00:00
Takaya Saito
78a869ec74 re PR libstdc++/48476 ([C++0x] conversion between std::tuple which have reference member is rejected)
2011-04-12  Takaya Saito  <gintensubaru@gmail.com>

	PR libstdc++/48476
	* include/std/tuple (_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&),
	_Tuple_impl<>::operator=(_Tuple_impl&&), _Tuple_impl<>::operator=
	(_Tuple_impl<>&&), tuple_cat): Use std::forward where appropriate.
	* testsuite/20_util/tuple/cons/48476.cc: New.
	* testsuite/20_util/tuple/48476.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/48476.cc: Likewise.

From-SVN: r172309
2011-04-12 10:31:33 +00:00
Jonathan Wakely
3e49fb0379 re PR libstdc++/48541 (std::function(std::_Function_base) should use std::addressof)
2011-04-10  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48541
	* include/std/functional (_Base_manager::_M_get_pointer): Use
	addressof.
	* testsuite/20_util/function/48541.cc: New.

From-SVN: r172244
2011-04-10 17:35:58 +01:00
Jeffrey Yasskin
7c16382a3a In C++0x mode, import iota and is_sorted from namespace std into namespace __gnu_cxx to avoid ambiguous call errors.
In C++0x mode, import iota and is_sorted from namespace std into
namespace __gnu_cxx to avoid ambiguous call errors.  copy_n would be a
good candidate for this too, except it was standardized with a
different return type.

Tested:
  `make -k check-c++` on x86_64-unknown-linux-gnu.

libstdc++-v3/ChangeLog:

2011-04-06  Jeffrey Yasskin  <jyasskin@google.com>

        * include/ext/algorithm (is_sorted): In C++0x mode import from
        namespace std.
        * include/ext/numeric (iota): In C++0x mode import from
        namespace std.
        * testsuite/ext/is_sorted/cxx0x.cc: New.
        * testsuite/ext/iota/cxx0x.cc: New.

From-SVN: r172073
2011-04-07 04:11:12 +00:00
Jonathan Wakely
0569d07d16 re PR libstdc++/48398 ([C++0x] std::unique_ptr<T, D> is broken when D::pointer is not T*)
2011-04-02  Jonathan Wakely  <redi@gcc.gnu.org>

	PR libstdc++/48398
	* include/bits/unique_ptr.h (__tuple_type): Store pointer type.
	* testsuite/20_util/unique_ptr/modifiers/48398.cc: New.
	* testsuite/20_util/unique_ptr/requirements/pointer_type.cc: Remove
	unused parameter name.

From-SVN: r171894
2011-04-02 20:32:15 +01:00
Paolo Carlini
246428c2d4 re PR libstdc++/48382 (ctype_noninline.h should not be installed)
2011-03-31  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48382
	* src/ctype.cc: Do not include <bits/ctype_noninline.h>.
	* src/Makefile.am: Add ctype_configure_char.cc to host_sources.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am: Remove ctype_noninline.h from host_headers.
	* include/Makefile.in: Regenerate.
	* doc/xml/manual/internals.xml: Update.
	* config/os/newlib/ctype_noninline.h: Fixup and rename to...
	* config/os/newlib/ctype_configure_char.cc: ... this.
	* config/os/aix/ctype_noninline.h: Likewise.
	* config/os/aix/ctype_configure_char.cc: Likewise.
	* config/os/vxworks/ctype_noninline.h: Likewise.
	* config/os/vxworks/ctype_configure_char.cc
	* config/os/hpux/ctype_noninline.h: Likewise.
	* config/os/hpux/ctype_configure_char.cc: Likewise.
	* config/os/gnu-linux/ctype_noninline.h: Likewise.
	* config/os/gnu-linux/ctype_configure_char.cc: Likewise.
	* config/os/mingw32/ctype_noninline.h: Likewise.
	* config/os/mingw32/ctype_configure_char.cc: Likewise.
	* config/os/tpf/ctype_noninline.h: Likewise.
	* config/os/tpf/ctype_configure_char.cc: Likewise.
	* config/os/uclibc/ctype_noninline.h: Likewise.
	* config/os/uclibc/ctype_configure_char.cc: Likewise.
	* config/os/bionic/ctype_noninline.h: Likewise.
	* config/os/bionic/ctype_configure_char.cc: Likewise.
	* config/os/djgpp/ctype_noninline.h: Likewise.
	* config/os/djgpp/ctype_configure_char.cc: Likewise.
	* config/os/qnx/qnx6.1/ctype_noninline.h: Likewise.
	* config/os/qnx/qnx6.1/ctype_configure_char.cc: Likewise.
	* config/os/bsd/netbsd/ctype_noninline.h: Likewise.
	* config/os/bsd/netbsd/ctype_configure_char.cc: Likewise.
	* config/os/bsd/darwin/ctype_noninline.h: Likewise.
	* config/os/bsd/darwin/ctype_configure_char.cc: Likewise.
	* config/os/bsd/freebsd/ctype_noninline.h: Likewise.
	* config/os/bsd/freebsd/ctype_configure_char.cc: Likewise.
	* config/os/irix/irix6.5/ctype_noninline.h: Likewise.
	* config/os/irix/irix6.5/ctype_configure_char.cc: Likewise.
	* config/os/generic/ctype_noninline.h: Likewise.
	* config/os/generic/ctype_configure_char.cc: Likewise.
	* config/os/solaris/solaris2.7/ctype_noninline.h: Likewise.
	* config/os/solaris/solaris2.7/ctype_configure_char.cc: Likewise.

From-SVN: r171790
2011-03-31 16:06:12 +00:00
Jonathan Wakely
e3e08a1db5 future (future::share): Add.
2011-03-25  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (future::share): Add.
	(packaged_task::result_type): Remove as per LWG 2030.
	(packaged_task::packaged_task): Remove redundant constructors, as per
	LWG 1514.
	* testsuite/30_threads/future/members/share.cc: New.
	* testsuite/30_threads/packaged_task/requirements/typedefs.cc: Remove.

From-SVN: r171531
2011-03-25 23:16:09 +00:00
Paolo Carlini
ff2e697a03 random.h (negative_binomial_distribution<>:: negative_binomial_distribution(_IntType, double), [...]): Tweak construction of _M_gd.
2011-03-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (negative_binomial_distribution<>::
	negative_binomial_distribution(_IntType, double),
	negative_binomial_distribution<>::
	negative_binomial_distribution(const param_type&)): Tweak
	construction of _M_gd.
	* include/bits/random.tcc (negative_binomial_distribution<>::
	operator()): Adjust.

From-SVN: r171443
2011-03-25 10:06:33 +00:00
Paolo Carlini
113b21bdaf random.h (negative_binomial_distribution<>:: negative_binomial_distribution(_IntType, double), [...]): Fix construction of _M_gd.
2011-03-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (negative_binomial_distribution<>::
	negative_binomial_distribution(_IntType, double),
	negative_binomial_distribution<>::
	negative_binomial_distribution(const param_type&)): Fix
	construction of _M_gd.
	* include/bits/random.tcc (negative_binomial_distribution<>::
	operator()): Fix computation, per Leger's algorithm.
	* testsuite/util/testsuite_random.h (discrete_pdf,
	negative_binomial_pdf, poisson_pdf, uniform_int_pdf): New.
	(binomial_pdf): Swap last two parameters.
	* testsuite/26_numerics/random/discrete_distribution/
	operators/values.cc: New.
	* testsuite/26_numerics/random/negative_binomial_distribution/
	operators/values.cc: Likewise.
	* testsuite/26_numerics/random/poisson_distribution/
	operators/values.cc: Likewise.
	* testsuite/26_numerics/random/uniform_int_distribution/
	operators/values.cc: Likewise.
	* testsuite/26_numerics/random/binomial_distribution/
	operators/values.cc: Adjust.

From-SVN: r171411
2011-03-24 16:49:19 +00:00
Paolo Carlini
355e71b9df shared_ptr.h (operator>, [...]): Add, per DR 1401.
2011-03-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/shared_ptr.h (operator>, operator<=, operator>=): Add,
	per DR 1401.
	(operator==, operator!=, operator<): Fix per the letter of DR 1401.
	* include/bits/shared_ptr_base.h: Likewise for __shared_ptr.
	* include/bits/unique_ptr.h (operator==, operator!=, operator<,
	operator<=, operator>, operator>=): Fix per the letter of DR 1401.
	* testsuite/20_util/shared_ptr/comparison/dr1401.cc: New.
	* testsuite/20_util/unique_ptr/comparison/dr1401.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust.

From-SVN: r171293
2011-03-22 15:15:03 +00:00
Benjamin Kosnik
d554574428 thread: Revert.
2011-03-15  Benjamin Kosnik  <bkoz@redhat.com>

        * include/std/thread: Revert.
        * src/thread.cc: Same.
        * config/abi/pre/gnu.ver: Same.

From-SVN: r171021
2011-03-16 00:02:11 +00:00
Doug Kwan
38b8f67a6d re PR libstdc++/48123 (bits/cpu_defines.h not installed in freestanding mode.)
2011-03-15  Doug Kwan  <dougkwan@google.com>

        PR libstdc++/48123
        * include/Makefile.am (install-freestanding-headers): Install
        cpu_defines.h
        * include/Makefile.in: Regenerate.

From-SVN: r171019
2011-03-15 20:56:52 +00:00
Benjamin Kosnik
e5a44bd645 regex_compiler.h: Nest namespace versioning.
2011-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/regex_compiler.h: Nest namespace versioning.
	* include/bits/regex_grep_matcher.tcc: Same.
	* include/bits/regex_grep_matcher.h: Same.
	* include/bits/regex_cursor.h: Same.
	* include/bits/regex_nfa.h: Same.
	* include/bits/regex_nfa.tcc: Same.

	* include/bits/regex_grep_matcher.h: Version forward declarations.
	* include/bits/c++config: Add namespace association for __regex.
	* include/bits/regex.h: Make sub_match consistent.

From-SVN: r170978
2011-03-15 02:55:19 +00:00
Benjamin Kosnik
e95992339f Makefile.am: Add functional.cc, shared_ptr.cc.
2011-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am: Add functional.cc, shared_ptr.cc.
	* src/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Add nested_exception.cc.
	* libsupc++/Makefile.in: Regenerate.
	* src/system_error.cc: Add ctor and dtor definitions for error_category.
	* src/functional.cc: New. Add dtor definition for bad_function_call.
	* src/stdexcept.cc: Add dtor definitions for domain_error,
	invalid_argument, length_error, out_of_range, range_error,
	overflow_error, underflow_error.
	* src/future.cc: Add dtor definition for __future_base::_Result_base.
	* src/shared_ptr.cc: New. Add dtor definition for bad_weak_ptr.
	* src/thread.cc: Add dtor for thread::_Impl_base.
	* include/std/system_error: Adjust.
	* include/std/stdexcept: Same.
	* include/std/future: Same.
	* include/std/functional: Same.
	* include/std/thread: Same.
	* include/bits/shared_ptr_base.h: Same.
	* libsupc++/nested_exception.cc: New. Add dtor for nested_exception.
	* libsupc++/nested_exception.h: Adjust.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line numbers.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
	* config/abi/pre/gnu.ver: Add new exports.

	* include/bits/regex_compiler.h: Nest namespace versioning.
	* include/bits/regex_grep_matcher.tcc: Same.
	* include/bits/regex_grep_matcher.h: Same.
	* include/bits/regex_cursor.h: Same.
	* include/bits/regex_nfa.h: Same.
	* include/bits/regex_nfa.tcc: Same.

From-SVN: r170975
2011-03-15 00:24:08 +00:00
Andrey Zholos
d8d4db3345 re PR libstdc++/48114 ([C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition)
2011-03-14  Andrey Zholos  <aaz@althenia.net>

	PR libstdc++/48114
	* include/bits/random.h (geometric_distribution): Correct formula
	in comment, per C++0x.
	(geometric_distribution<>::param_type::param_type(double)): Fix check.
	(geometric_distribution<>::param_type::_M_initialize):
	Store log(1 - p).
	* include/bits/random.tcc (geometric_distribution<>::operator()):
	Fix computation.
	(binomial_distribution<>::operator()): Likewise.

From-SVN: r170946
2011-03-14 17:57:48 +00:00
Paolo Carlini
60c5236ed1 [multiple changes]
2011-03-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_rvalref.h: Minor tweaks.

2011-03-09  Jonathan Wakely  <redi@gcc.gnu.org>
	    Chris Jefferson  <chris@bubblescope.net>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_rvalref.h (rvalstruct_compare_by_value):
	New.
	* testsuite/25_algorithms/sort_heap/check_compare_by_value.cc:
	Likewise.
	* testsuite/25_algorithms/partial_sort/check_compare_by_value:
	Likewise.
	* testsuite/25_algorithms/stable_sort/check_compare_by_value.cc:
	Likewise.
	* testsuite/25_algorithms/sort/check_compare_by_value: Likewise.

2011-03-09  Chris Jefferson  <chris@bubblescope.net>

	PR libstdc++/48038
	* include/bits/stl_algo.h (__merge_backward): Rename to
	__move_merge_backward and change to always move rather than copy.
	(__move_merge): New function similar to std::merge except values
	are moved instead of copied.
	(__merge_adaptive, __merge_sort_loop): Change from using std::merge
	and __merge_backward to __move_merge and __move_merge_backward.

From-SVN: r170827
2011-03-09 18:30:11 +00:00
Benjamin Kosnik
b329dd10a9 re PR libstdc++/47145 (configure test for docbook-xsl-ns stylesheets uses hardcoded path)
2011-03-07  Benjamin Kosnik  <bkoz@redhat.com>
            Matthias Klose  <doko@ubuntu.com>
	    Jonathan Wakely  <redi@gcc.gnu.org>

	PR libstdc++/47145
	* acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Define.
	* configure.ac: Use it.
	* doc/Makefile.am (XSL_STYLE_DIR): Set at configure time.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.


Co-Authored-By: Jonathan Wakely <redi@gcc.gnu.org>
Co-Authored-By: Matthias Klose <doko@ubuntu.com>

From-SVN: r170763
2011-03-08 00:04:05 +00:00
Benjamin Kosnik
ed4f96af59 Makefile.am (inst_sources): Make source instantion files conditional.
2011-03-04  Benjamin Kosnik  <bkoz@chula>

	* src/Makefile.am (inst_sources): Make source instantion files
	conditional.
	(XTEMPLATE_FLAGS): Make -fno-implicit-templates conditional.
	* src/Makefile.in: Regenerate.
	* src/valarray-inst.cc: Move to..
	* src/valarray.cc: ...this.
	* acinclude.m4 (GLIBCXX_ENABLE_EXTERN_TEMPLATE]): Define.
	* configure.ac (GLIBCXX_ENABLE_EXTERN_TEMPLATE): Use it.
	* configure: Regenerate.
	* include/Makefile.am (stamp-extern-template): Add.
	* include/Makefile.in: Regenerate.

	* doc/xml/manual/configure.xml: Document --enable-extern-template.

	* include/bits/locale_classes.tcc: Adjust comment.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/basic_ios.tcc: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/codecvt.h: Same.
	* include/bits/ostream.tcc: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/c++config: Same.
	* include/bits/basic_string.tcc: Same.
	* include/bits/ostream_insert.h: Same.
	* include/bits/locale_facets_nonio.tcc: Same.
	* include/bits/streambuf.tcc: Same.
	* include/bits/allocator.h: Same.
	* include/bits/fstream.tcc: Same.

	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers.

From-SVN: r170686
2011-03-04 21:51:56 +00:00
Marc Glisse
a7443a2dd6 ratio (ratio_less): Add comments.
2011-03-02  Marc Glisse  <marc.glisse@normalesup.org>

	* include/std/ratio (ratio_less): Add comments.

From-SVN: r170617
2011-03-02 15:06:00 +00:00
Marc Glisse
8fddbce4ab re PR libstdc++/47913 ([C++0x] improve ratio_add to overflow less often)
2011-03-02  Marc Glisse  <marc.glisse@normalesup.org>

	PR libstdc++/47913
	* include/std/ratio (ratio_add): Avoid denominator overflow.
	* testsuite/20_util/ratio/operations/47913.cc: New.

From-SVN: r170616
2011-03-02 14:57:57 +00:00
Paolo Carlini
1139a7354d re PR libstdc++/47921 (pbump will overflow when input n is larger than 2G-1)
2011-02-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/47921
	* include/std/streambuf (basic_streambuf<>::__safe_gbump,
	__safe_pbump): Add.
	* include/bits/streambuf.tcc (basic_streambuf<>::xgetn,
	xputn): Use the latter.
	* include/bits/streambuf_iterator.h: Likewise.
	* src/strstream.cc: Likewise.
	* src/streambuf.cc: Likewise.
	* src/compatibility.cc: Likewise.
	* src/istream.cc: Likewise.
	* include/bits/fstream.tcc (basic_filebuf<>::xsgetn): Use setg
	instead of gbump.
	* include/std/sstream (basic_stringbuf<>::_M_pbump): Add.
	* include/bits/sstream.tcc (basic_stringbuf<>::seekoff,
	seekpos, _M_sync): Use setg, setp, and _M_pbump.
	* config/abi/pre/gnu.ver: Tweak.

From-SVN: r170579
2011-02-28 23:50:57 +00:00
Paolo Carlini
d154f92719 [multiple changes]
2011-02-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/ratio/comparisons/comp3.cc: New.

2011-02-28  Marc Glisse  <marc.glisse@normalesup.org>

	PR libstdc++/42622
	* include/std/ratio (ratio_less): Reimplement to never overflow.
	* testsuite/20_util/ratio/comparisons/comp2.cc: Extend.

From-SVN: r170567
2011-02-28 16:46:23 +00:00
François Dumont
c543b18ae2 string (basic_string::insert): Add iterator check and pass normal iterator to normal insert.
2011-02-19  François Dumont  <francois.cppdevs@free.fr>

        * include/debug/string (basic_string::insert): Add iterator check and
        pass normal iterator to normal insert.
        * include/debug/macros.h (__glibcxx_check_heap,
        __glibcxx_check_heap_pred): Remove __glibcxx_check_valid_range,
        already done.

From-SVN: r170322
2011-02-19 20:51:43 +00:00
Jonathan Wakely
18b08cb9eb regex.h (basic_regex::traits_type): Add typedef.
2011-02-17  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/regex.h (basic_regex::traits_type): Add typedef.
	(basic_regex::basic_regex(basic_regex&&)): Add noexcept.
	(basic_regex::operator=(basic_regex&&)): Likewise.
	(basic_regex::assign(basic_regex&&)): Likewise.
	(operator==(sub_match,...)): Implement DR 1181.
	(match_results::match_results(match_results&&)): Define.
	(match_results::operator=(const match_results&)): Fix parameter type.
	(match_results::operator=(match_results&&)): Define.

From-SVN: r170238
2011-02-17 02:39:16 +00:00
Jonathan Wakely
948ef71060 re PR libstdc++/47724 ([C++0x] Regex string anchors cause segfault)
2011-02-17  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/47724
	* include/bits/regex_compiler.h (_Scanner::_M_advance): Do not treat
	line anchors as metacharacters.
	* testsuite/28_regex/basic_regex/ctors/47724.cc: New.

From-SVN: r170236
2011-02-17 01:47:21 +00:00
Paolo Carlini
bde8d7f701 re PR libstdc++/47773 (Versatile string lacks a default hash function)
2011-02-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/47773
	* include/ext/vstring.h (hash<__gnu_cxx::__vstring>,
	hash<__gnu_cxx::__wvstring>, hash<__gnu_cxx::__u16vstring>,
	hash<__gnu_cxx::__u32vstring>): Add.
	* testsuite/ext/vstring/hash/char/1.cc: New.
	* testsuite/ext/vstring/hash/wchar_t/1.cc: Likewise.

From-SVN: r170235
2011-02-17 01:24:37 +00:00
Jonathan Wakely
8c53c3ae5a regex.h (match_results::format): Use char_traits.
2011-02-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/regex.h (match_results::format): Use char_traits.

From-SVN: r170225
2011-02-16 22:29:15 +00:00
Benjamin Kosnik
036e0d4f8f atomic: Remove atomic_address, uplift to N3225.
2011-02-16  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/atomic: Remove atomic_address, uplift to N3225.
	* include/bits/atomic_0.h: Same.
	* include/bits/atomic_2.h: Same.
	* include/bits/atomic_base.h: Same.
	* testsuite/29_atomics/atomic_address/*: Delete.

From-SVN: r170217
2011-02-16 19:01:51 +00:00
Jonathan Wakely
bf6319b96a regex.h (sub_match::sub_match): Add.
2011-02-14  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/regex.h (sub_match::sub_match): Add.
	(match_results::ready): Add.
	(match_results::empty): Adjust.
	(match_results::length): Add missing dereference.
	(match_results::operator[],prefix,suffix): Add debug mode checks.
	(match_results::cend): Re-use end().
	(match_results::format): Adjust signatures.
	(operator==(match_results,match_results)): Implement.
	* include/bits/regex_compiler.h (_Scanner_base): Use constexpr.
	* include/bits/regex_constants.h (syntax_option_type): Likewise.
	* include/bits/regex_grep_matcher.h: Fix comment typo.
	(_Specialized_results::_Specialized_results): Simplify.
	* include/bits/regex_cursor.h: Fix comment typo.
	* include/bits/regex_nfa.h: Likewise.
	* testsuite/28_regex/basic_regex/ctors/basic/string_range_01_02_03.cc:
	Fix error code, remove xfail.
	* testsuite/28_regex/basic_regex/ctors/extended/
	string_range_01_02_03.cc: Likewise.

From-SVN: r170158
2011-02-14 23:35:22 +00:00