Commit Graph

9635 Commits

Author SHA1 Message Date
Jonathan Wakely
40799fe51f Add missing <random> header in testcase
* testsuite/experimental/algorithm/sample.cc: Add missing header.

From-SVN: r241130
2016-10-13 17:42:53 +01:00
Jonathan Wakely
10482a6598 Qualify use of std::declval to avoid ADL
* include/experimental/propagate_const (element_type): Qualify
	declval.

From-SVN: r241129
2016-10-13 17:41:10 +01:00
Jonathan Wakely
f49adbb8d8 Change test to use VERIFY not assert
* testsuite/26_numerics/random/default_random_engine.cc: Use VERIFY
	instead of assert.

From-SVN: r241128
2016-10-13 17:37:47 +01:00
Jonathan Wakely
5117a23e9f Use normal mode containers in searchers
* include/experiumental/functional (boyer_moore_searcher)
	(__boyer_moore_map_base, __boyer_moore_array_base): Qualify containers
	with _GLIBCXX_STD_C.
	* include/std/functional: Likewise.

From-SVN: r241126
2016-10-13 16:50:35 +01:00
Jonathan Wakely
0c0d2a4cf0 Replace non-constexpr decrement in std::chrono::floor
* include/std/chrono (floor): Replace non-constexpr operation.
	* testsuite/20_util/duration_cast/rounding.cc: Test conversion to
	durations with floating pointer representations.

From-SVN: r241122
2016-10-13 15:42:09 +01:00
Jonathan Wakely
3396fcc095 Restore __bind_simple for compat symbols
* src/c++11/compatibility-thread-c++0x.cc (_Bind_simple)
	(_Bind_simple_helper, __bind_simple): Restore for ABI compat symbols.

From-SVN: r241111
2016-10-13 13:39:19 +01:00
Jonathan Wakely
5579170b40 Replace __bind_simple with std:🧵:__make_invoker
* include/std/functional (_Bind_simple, _Bind_simple_helper)
	(__bind_simple): Remove.
	* include/std/future: Include <bits/invoke.h> instead of <functional>.
	(__future_base::_Task_state::_M_run)
	(__future_base::_Task_state::_M_run_delayed): Use lambda expressions
	instead of __bind_simple.
	(__future_base::_Task_state::_S_maybe_wrap_ref): Remove.
	(async): Use thread::__make_invoker instead of __bind_simple.
	* include/std/thread: Include <tuple> and <bits/invoke.h> instead of
	<functional>.
	(thread::_Invoker, thread::__make_invoker): Define helpers to do
	INVOKE(DECAY_COPY(f), DECAY_COPY(args)...).

From-SVN: r241093
2016-10-13 11:37:13 +01:00
Jonathan Wakely
cc06c7f652 Fix exception-specifications for std::_Not_fn
* include/std/functional (_Not_fn): Make exception specifications
	depend on whether negating the result can throw.
	* testsuite/20_util/not_fn/1.cc: Move to ...
	* testsuite/20_util/function_objects/not_fn/1.cc: ... here. Add tests
	for types that can throw when negated and that cannot be negated.

From-SVN: r241091
2016-10-13 11:19:24 +01:00
Jonathan Wakely
3e0c9334e9 Fix exception-specification of std::invoke
* include/bits/invoke.h (__invoke): Fix exception-specification.
	* include/std/functional (invoke): Likewise.
	* testsuite/20_util/function_objects/invoke/1.cc: New test.

From-SVN: r241089
2016-10-13 09:55:40 +01:00
Paolo Carlini
7daade997e testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort.
2016-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_hooks.h: Rewrite VERIFY in terms of
	__builtin_printf and __builtin_abort.
	* testsuite/lib/libstdc++.exp: Remove _GLIBCXX_ASSERT use.
	* scripts/testsuite_flags.in: Likewise.
	* testsuite/22_locale/time_get/get/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/close/char/4879.cc: Likewise, adjust.
	* testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/26777.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/objects/char/7.cc: Likewise.
	* testsuite/27_io/objects/char/9661-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/7.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
	* testsuite/18_support/50594.cc: Remove 'test' variable, adjust.
	* testsuite/18_support/bad_alloc/what.cc: Likewise.
	* testsuite/18_support/bad_cast/what.cc: Likewise.
	* testsuite/18_support/bad_exception/what.cc: Likewise.
	* testsuite/18_support/bad_typeid/what.cc: Likewise.
	* testsuite/18_support/exception/38732.cc: Likewise.
	* testsuite/18_support/exception/what.cc: Likewise.
	* testsuite/18_support/exception_ptr/64241.cc: Likewise.
	* testsuite/18_support/exception_ptr/current_exception.cc: Likewise.
	* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
	* testsuite/18_support/exception_ptr/make_exception_ptr.cc: Likewise.
	* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
	* testsuite/18_support/nested_exception/cons.cc: Likewise.
	* testsuite/18_support/nested_exception/nested_ptr.cc: Likewise.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc: Likewise.
	* testsuite/18_support/nested_exception/rethrow_nested.cc: Likewise.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Likewise.
	* testsuite/18_support/numeric_limits/char16_32_t.cc: Likewise.
	* testsuite/18_support/numeric_limits/digits10.cc: Likewise.
	* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
	* testsuite/18_support/numeric_limits/epsilon.cc: Likewise.
	* testsuite/18_support/numeric_limits/is_iec559.cc: Likewise.
	* testsuite/18_support/numeric_limits/is_signed.cc: Likewise.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/18_support/numeric_limits/min_max.cc: Likewise.
	* testsuite/18_support/numeric_limits/specialization_default_values.cc:
	Likewise.
	* testsuite/18_support/type_info/hash_code.cc: Likewise.
	* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Likewise.
	* testsuite/19_diagnostics/error_category/cons/default.cc: Likewise.
	* testsuite/19_diagnostics/error_category/operators/equal.cc: Likewise.
	* testsuite/19_diagnostics/error_category/operators/
	not_equal.cc: Likewise.
	* testsuite/19_diagnostics/error_code/cons/1.cc: Likewise.
	* testsuite/19_diagnostics/error_code/cons/39882.cc: Likewise.
	* testsuite/19_diagnostics/error_code/modifiers/39882.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/equal.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/not_equal.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/cons/39881.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/modifiers/39881.cc: 
	Likewise.
	* testsuite/19_diagnostics/error_condition/operators/bool.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/operators/equal.cc:
	Likewise.
	* testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
	Likewise.
	* testsuite/19_diagnostics/logic_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-big.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-big.cc: Likewise.
	* testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-4.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-big.cc: Likewise.
	* testsuite/20_util/addressof/1.cc: Likewise.
	* testsuite/20_util/align/1.cc: Likewise.
	* testsuite/20_util/align/2.cc: Likewise.
	* testsuite/20_util/allocator/1.cc: Likewise.
	* testsuite/20_util/allocator/10378.cc: Likewise.
	* testsuite/20_util/allocator/8230.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/allocate_hint.cc:
	Likewise.
	* testsuite/20_util/allocator_traits/members/construct.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/destroy.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/max_size.cc: Likewise.
	* testsuite/20_util/any/assign/exception.cc: Likewise.
	* testsuite/20_util/auto_ptr/1.cc: Likewise.
	* testsuite/20_util/auto_ptr/2.cc: Likewise.
	* testsuite/20_util/auto_ptr/3.cc: Likewise.
	* testsuite/20_util/auto_ptr/4.cc: Likewise.
	* testsuite/20_util/auto_ptr/5.cc: Likewise.
	* testsuite/20_util/auto_ptr/6.cc: Likewise.
	* testsuite/20_util/auto_ptr/7.cc: Likewise.
	* testsuite/20_util/bind/all_bound.cc: Likewise.
	* testsuite/20_util/bind/conv_result.cc: Likewise.
	* testsuite/20_util/bind/cv_quals.cc: Likewise.
	* testsuite/20_util/bind/cv_quals_2.cc
	* testsuite/20_util/bind/nested.cc: Likewise.
	* testsuite/20_util/bind/placeholders.cc: Likewise.
	* testsuite/20_util/bind/ref.cc: Likewise.
	* testsuite/20_util/bind/ref2.cc: Likewise.
	* testsuite/20_util/common_type/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/1.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/2.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/58850.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
	* testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
	* testsuite/20_util/duration/cons/1.cc: Likewise.
	* testsuite/20_util/duration/cons/2.cc: Likewise.
	* testsuite/20_util/enable_if/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/enable_shared_from_this/members/assign.cc:
	Likewise.
	* testsuite/20_util/exchange/1.cc: Likewise.
	* testsuite/20_util/forward/a.cc: Likewise.
	* testsuite/20_util/forward/b.cc: Likewise.
	* testsuite/20_util/forward/d.cc: Likewise.
	* testsuite/20_util/function/1.cc: Likewise.
	* testsuite/20_util/function/2.cc: Likewise.
	* testsuite/20_util/function/3.cc: Likewise.
	* testsuite/20_util/function/4.cc: Likewise.
	* testsuite/20_util/function/43397.cc: Likewise.
	* testsuite/20_util/function/5.cc: Likewise.
	* testsuite/20_util/function/6.cc: Likewise.
	* testsuite/20_util/function/7.cc: Likewise.
	* testsuite/20_util/function/8.cc: Likewise.
	* testsuite/20_util/function/9.cc: Likewise.
	* testsuite/20_util/function/assign/move.cc: Likewise.
	* testsuite/20_util/function/cons/move.cc: Likewise.
	* testsuite/20_util/function_objects/dr660.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_bit_flip_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_bit_string_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_document_words.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_uniform_random.cc: Likewise.
	* testsuite/20_util/hash/operators/size_t.cc: Likewise.
	* testsuite/20_util/hash/quality.cc: Likewise.
	* testsuite/20_util/integral_constant/static_definition.cc: Likewise.
	* testsuite/20_util/integral_constant/true_false_value.cc: Likewise.
	* testsuite/20_util/is_function/24808.cc: Likewise.
	* testsuite/20_util/is_object/24808.cc: Likewise.
	* testsuite/20_util/move_if_noexcept/1.cc: Likewise.
	* testsuite/20_util/move_if_noexcept/constexpr.cc: Likewise.
	* testsuite/20_util/owner_less/cmp.cc: Likewise.
	* testsuite/20_util/pair/1.cc: Likewise.
	* testsuite/20_util/pair/2.cc: Likewise.
	* testsuite/20_util/pair/3.cc: Likewise.
	* testsuite/20_util/pair/4.cc: Likewise.
	* testsuite/20_util/pair/make_pair/constexpr.cc: Likewise.
	* testsuite/20_util/pair/moveable.cc: Likewise.
	* testsuite/20_util/pair/piecewise.cc: Likewise.
	* testsuite/20_util/pair/swap.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
	* testsuite/20_util/ratio/cons/cons1.cc: Likewise.
	* testsuite/20_util/ratio/operations/45866.cc: Likewise.
	* testsuite/20_util/ratio/operations/47913.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops1.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops2.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops3.cc: Likewise.
	* testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
	* testsuite/20_util/scoped_allocator/1.cc: Likewise.
	* testsuite/20_util/scoped_allocator/2.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/assign.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/move.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
	* testsuite/20_util/shared_ptr/comparison/less.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/alias.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/copy.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/default.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/move.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/nullptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
	* testsuite/20_util/shared_ptr/dest/dest.cc: Likewise.
	* testsuite/20_util/shared_ptr/hash/1.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/24595.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/42019.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/io.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/swap.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/owner_before.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/unique.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	move_iterators/1.cc: Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
	move_iterators/1.cc: Likewise.
	* testsuite/20_util/temporary_buffer.cc: Likewise.
	* testsuite/20_util/time_point/1.cc: Likewise.
	* testsuite/20_util/time_point/2.cc: Likewise.
	* testsuite/20_util/time_point/3.cc: Likewise.
	* testsuite/20_util/time_point/nonmember/constexpr.cc: Likewise.
	* testsuite/20_util/tuple/48476.cc: Likewise.
	* testsuite/20_util/tuple/comparison_operators/comparisons.cc:
	Likewise.
	* testsuite/20_util/tuple/cons/allocators.cc: Likewise.
	* testsuite/20_util/tuple/cons/assignment.cc: Likewise.
	* testsuite/20_util/tuple/cons/big_tuples.cc: Likewise.
	* testsuite/20_util/tuple/cons/constructor.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/23978.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/48476.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc:
	Likewise.
	* testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/tie.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/tie2.cc: Likewise.
	* testsuite/20_util/tuple/cv_tuple_size.cc: Likewise.
	* testsuite/20_util/tuple/element_access/get.cc: Likewise.
	* testsuite/20_util/tuple/element_access/get_by_type.cc: Likewise.
	* testsuite/20_util/tuple/moveable.cc: Likewise.
	* testsuite/20_util/tuple/swap.cc: Likewise.
	* testsuite/20_util/tuple/tuple_size.cc: Likewise.
	* testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
	* testsuite/20_util/typeindex/hash.cc: Likewise.
	* testsuite/20_util/typeindex/hash_code.cc: Likewise.
	* testsuite/20_util/typeindex/name.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/48635.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/move.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/move_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/nullptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/nullptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/pointer.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/pointer_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter.cc: Likewise.
	* testsuite/20_util/unique_ptr/creation/array.cc: Likewise.
	* testsuite/20_util/unique_ptr/creation/single.cc: Likewise.
	* testsuite/20_util/unique_ptr/hash/1.cc: Likewise.
	* testsuite/20_util/unique_ptr/modifiers/43183.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/
	comparisons.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/
	comparisons_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc:
	Likewise.
	* testsuite/20_util/uses_allocator/construction.cc: Likewise.
	* testsuite/20_util/uses_allocator/value.cc: Likewise.
	* testsuite/20_util/variant/run.cc: Likewise.
	* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc:
	Likewise.
	* testsuite/21_strings/basic_string/cons/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/42261.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/5.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/6.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/8.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/moveable.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/moveable2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/4.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/42261.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/5.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/6.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/58163.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/front_back.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string/init-list.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/
	28277.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/8.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/9.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/pod/
	10081-in.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/pod/
	10081-out.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	10.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	11.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	28277.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/
	move_assign.cc: Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
	move_assign.cc: Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	to_string.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	dr1261.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stod.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stof.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoi.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stol.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stold.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoll.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoul.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	to_wstring.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/13650.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/data/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/substr/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/substr/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/4.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/5.cc: Likewise.
	* testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	empty.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	empty.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	4.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/string_conversion/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operators/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/c_strings/char/1.cc: Likewise.
	* testsuite/21_strings/c_strings/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/char/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/char/57704.cc:
	Likewise.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Likewise.

	* doc/xml/manual/test.xml: Fix typo.

From-SVN: r241070
2016-10-12 16:14:17 +00:00
Paolo Carlini
118c842441 testsuite_hooks.h: Rewrite VERIFY in terms of __builtin_printf and __builtin_abort.
2016-10-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_hooks.h: Rewrite VERIFY in terms of
	__builtin_printf and __builtin_abort.
	* testsuite/lib/libstdc++.exp: Remove _GLIBCXX_ASSERT use.
	* scripts/testsuite_flags.in: Likewise.
	* testsuite/22_locale/time_get/get/char/1.cc: Likewise.
	* testsuite/22_locale/time_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/time_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/time_get/get/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/close/char/4879.cc: Likewise, adjust.
	* testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/26777.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
	Likewise.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
	Likewise.
	* testsuite/27_io/objects/char/7.cc: Likewise.
	* testsuite/27_io/objects/char/9661-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/7.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
	* testsuite/18_support/50594.cc: Remove 'test' variable, adjust.
	* testsuite/18_support/bad_alloc/what.cc: Likewise.
	* testsuite/18_support/bad_cast/what.cc: Likewise.
	* testsuite/18_support/bad_exception/what.cc: Likewise.
	* testsuite/18_support/bad_typeid/what.cc: Likewise.
	* testsuite/18_support/exception/38732.cc: Likewise.
	* testsuite/18_support/exception/what.cc: Likewise.
	* testsuite/18_support/exception_ptr/64241.cc: Likewise.
	* testsuite/18_support/exception_ptr/current_exception.cc: Likewise.
	* testsuite/18_support/exception_ptr/lifespan.cc: Likewise.
	* testsuite/18_support/exception_ptr/make_exception_ptr.cc: Likewise.
	* testsuite/18_support/exception_ptr/rethrow_exception.cc: Likewise.
	* testsuite/18_support/nested_exception/cons.cc: Likewise.
	* testsuite/18_support/nested_exception/nested_ptr.cc: Likewise.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc: Likewise.
	* testsuite/18_support/nested_exception/rethrow_nested.cc: Likewise.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Likewise.
	* testsuite/18_support/numeric_limits/char16_32_t.cc: Likewise.
	* testsuite/18_support/numeric_limits/digits10.cc: Likewise.
	* testsuite/18_support/numeric_limits/dr559.cc: Likewise.
	* testsuite/18_support/numeric_limits/epsilon.cc: Likewise.
	* testsuite/18_support/numeric_limits/is_iec559.cc: Likewise.
	* testsuite/18_support/numeric_limits/is_signed.cc: Likewise.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/18_support/numeric_limits/min_max.cc: Likewise.
	* testsuite/18_support/numeric_limits/specialization_default_values.cc:
	Likewise.
	* testsuite/18_support/type_info/hash_code.cc: Likewise.
	* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Likewise.
	* testsuite/19_diagnostics/error_category/cons/default.cc: Likewise.
	* testsuite/19_diagnostics/error_category/operators/equal.cc: Likewise.
	* testsuite/19_diagnostics/error_category/operators/
	not_equal.cc: Likewise.
	* testsuite/19_diagnostics/error_code/cons/1.cc: Likewise.
	* testsuite/19_diagnostics/error_code/cons/39882.cc: Likewise.
	* testsuite/19_diagnostics/error_code/modifiers/39882.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/equal.cc: Likewise.
	* testsuite/19_diagnostics/error_code/operators/not_equal.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/cons/39881.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/modifiers/39881.cc: 
	Likewise.
	* testsuite/19_diagnostics/error_condition/operators/bool.cc: Likewise.
	* testsuite/19_diagnostics/error_condition/operators/equal.cc:
	Likewise.
	* testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
	Likewise.
	* testsuite/19_diagnostics/logic_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/logic_error/what-big.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/runtime_error/what-big.cc: Likewise.
	* testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-1.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-2.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-3.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-4.cc: Likewise.
	* testsuite/19_diagnostics/system_error/what-big.cc: Likewise.
	* testsuite/20_util/addressof/1.cc: Likewise.
	* testsuite/20_util/align/1.cc: Likewise.
	* testsuite/20_util/align/2.cc: Likewise.
	* testsuite/20_util/allocator/1.cc: Likewise.
	* testsuite/20_util/allocator/10378.cc: Likewise.
	* testsuite/20_util/allocator/8230.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/allocate_hint.cc:
	Likewise.
	* testsuite/20_util/allocator_traits/members/construct.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/destroy.cc: Likewise.
	* testsuite/20_util/allocator_traits/members/max_size.cc: Likewise.
	* testsuite/20_util/any/assign/exception.cc: Likewise.
	* testsuite/20_util/auto_ptr/1.cc: Likewise.
	* testsuite/20_util/auto_ptr/2.cc: Likewise.
	* testsuite/20_util/auto_ptr/3.cc: Likewise.
	* testsuite/20_util/auto_ptr/4.cc: Likewise.
	* testsuite/20_util/auto_ptr/5.cc: Likewise.
	* testsuite/20_util/auto_ptr/6.cc: Likewise.
	* testsuite/20_util/auto_ptr/7.cc: Likewise.
	* testsuite/20_util/bind/all_bound.cc: Likewise.
	* testsuite/20_util/bind/conv_result.cc: Likewise.
	* testsuite/20_util/bind/cv_quals.cc: Likewise.
	* testsuite/20_util/bind/cv_quals_2.cc
	* testsuite/20_util/bind/nested.cc: Likewise.
	* testsuite/20_util/bind/placeholders.cc: Likewise.
	* testsuite/20_util/bind/ref.cc: Likewise.
	* testsuite/20_util/bind/ref2.cc: Likewise.
	* testsuite/20_util/common_type/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/1.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/2.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/58850.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
	* testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
	* testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
	* testsuite/20_util/duration/cons/1.cc: Likewise.
	* testsuite/20_util/duration/cons/2.cc: Likewise.
	* testsuite/20_util/enable_if/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/enable_shared_from_this/members/assign.cc:
	Likewise.
	* testsuite/20_util/exchange/1.cc: Likewise.
	* testsuite/20_util/forward/a.cc: Likewise.
	* testsuite/20_util/forward/b.cc: Likewise.
	* testsuite/20_util/forward/d.cc: Likewise.
	* testsuite/20_util/function/1.cc: Likewise.
	* testsuite/20_util/function/2.cc: Likewise.
	* testsuite/20_util/function/3.cc: Likewise.
	* testsuite/20_util/function/4.cc: Likewise.
	* testsuite/20_util/function/43397.cc: Likewise.
	* testsuite/20_util/function/5.cc: Likewise.
	* testsuite/20_util/function/6.cc: Likewise.
	* testsuite/20_util/function/7.cc: Likewise.
	* testsuite/20_util/function/8.cc: Likewise.
	* testsuite/20_util/function/9.cc: Likewise.
	* testsuite/20_util/function/assign/move.cc: Likewise.
	* testsuite/20_util/function/cons/move.cc: Likewise.
	* testsuite/20_util/function_objects/dr660.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_bit_flip_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_bit_string_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_document_words.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_uniform_random.cc: Likewise.
	* testsuite/20_util/hash/operators/size_t.cc: Likewise.
	* testsuite/20_util/hash/quality.cc: Likewise.
	* testsuite/20_util/integral_constant/static_definition.cc: Likewise.
	* testsuite/20_util/integral_constant/true_false_value.cc: Likewise.
	* testsuite/20_util/is_function/24808.cc: Likewise.
	* testsuite/20_util/is_object/24808.cc: Likewise.
	* testsuite/20_util/move_if_noexcept/1.cc: Likewise.
	* testsuite/20_util/move_if_noexcept/constexpr.cc: Likewise.
	* testsuite/20_util/owner_less/cmp.cc: Likewise.
	* testsuite/20_util/pair/1.cc: Likewise.
	* testsuite/20_util/pair/2.cc: Likewise.
	* testsuite/20_util/pair/3.cc: Likewise.
	* testsuite/20_util/pair/4.cc: Likewise.
	* testsuite/20_util/pair/make_pair/constexpr.cc: Likewise.
	* testsuite/20_util/pair/moveable.cc: Likewise.
	* testsuite/20_util/pair/piecewise.cc: Likewise.
	* testsuite/20_util/pair/swap.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
	* testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
	* testsuite/20_util/ratio/cons/cons1.cc: Likewise.
	* testsuite/20_util/ratio/operations/45866.cc: Likewise.
	* testsuite/20_util/ratio/operations/47913.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops1.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops2.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops3.cc: Likewise.
	* testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
	* testsuite/20_util/scoped_allocator/1.cc: Likewise.
	* testsuite/20_util/scoped_allocator/2.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/assign.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/move.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
	* testsuite/20_util/shared_ptr/comparison/less.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/alias.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/copy.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/default.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/move.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/nullptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
	* testsuite/20_util/shared_ptr/dest/dest.cc: Likewise.
	* testsuite/20_util/shared_ptr/hash/1.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/24595.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/42019.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/io.cc: Likewise.
	* testsuite/20_util/shared_ptr/misc/swap.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset_alloc.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise.
	* testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/owner_before.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/unique.cc: Likewise.
	* testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	move_iterators/1.cc: Likewise.
	* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
	move_iterators/1.cc: Likewise.
	* testsuite/20_util/temporary_buffer.cc: Likewise.
	* testsuite/20_util/time_point/1.cc: Likewise.
	* testsuite/20_util/time_point/2.cc: Likewise.
	* testsuite/20_util/time_point/3.cc: Likewise.
	* testsuite/20_util/time_point/nonmember/constexpr.cc: Likewise.
	* testsuite/20_util/tuple/48476.cc: Likewise.
	* testsuite/20_util/tuple/comparison_operators/comparisons.cc:
	Likewise.
	* testsuite/20_util/tuple/cons/allocators.cc: Likewise.
	* testsuite/20_util/tuple/cons/assignment.cc: Likewise.
	* testsuite/20_util/tuple/cons/big_tuples.cc: Likewise.
	* testsuite/20_util/tuple/cons/constructor.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/23978.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/48476.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc:
	Likewise.
	* testsuite/20_util/tuple/creation_functions/make_tuple.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/tie.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/tie2.cc: Likewise.
	* testsuite/20_util/tuple/cv_tuple_size.cc: Likewise.
	* testsuite/20_util/tuple/element_access/get.cc: Likewise.
	* testsuite/20_util/tuple/element_access/get_by_type.cc: Likewise.
	* testsuite/20_util/tuple/moveable.cc: Likewise.
	* testsuite/20_util/tuple/swap.cc: Likewise.
	* testsuite/20_util/tuple/tuple_size.cc: Likewise.
	* testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
	* testsuite/20_util/typeindex/hash.cc: Likewise.
	* testsuite/20_util/typeindex/hash_code.cc: Likewise.
	* testsuite/20_util/typeindex/name.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/48635.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/move.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/move_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/nullptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/nullptr.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/pointer.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/pointer_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter.cc: Likewise.
	* testsuite/20_util/unique_ptr/creation/array.cc: Likewise.
	* testsuite/20_util/unique_ptr/creation/single.cc: Likewise.
	* testsuite/20_util/unique_ptr/hash/1.cc: Likewise.
	* testsuite/20_util/unique_ptr/modifiers/43183.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/
	comparisons.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/
	comparisons_array.cc: Likewise.
	* testsuite/20_util/unique_ptr/specialized_algorithms/swap.cc:
	Likewise.
	* testsuite/20_util/uses_allocator/construction.cc: Likewise.
	* testsuite/20_util/uses_allocator/value.cc: Likewise.
	* testsuite/20_util/variant/run.cc: Likewise.
	* testsuite/20_util/weak_ptr/observers/owner_before.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
	Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc:
	Likewise.
	* testsuite/21_strings/basic_string/cons/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/42261.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/5.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/6.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/8.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/moveable.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/char/moveable2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/4.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/42261.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/5.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/6.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/58163.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/char/front_back.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string/element_access/wchar_t/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string/init-list.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/
	28277.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/8.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/char/9.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/pod/
	10081-in.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/pod/
	10081-out.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	10.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	11.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/
	28277.cc: Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc:
	Likewise.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/
	move_assign.cc: Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
	move_assign.cc: Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/6.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
	Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/char/
	to_string.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	dr1261.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stod.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stof.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoi.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stol.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stold.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoll.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoul.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	to_wstring.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/13650.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/data/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/rfind/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/substr/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/substr/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/4.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/4.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/5.cc: Likewise.
	* testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	empty.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	empty.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/
	front_back.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
	wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/
	13650.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/
	4.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/
	3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/string_conversion/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/char/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/
	1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operators/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/c_strings/char/1.cc: Likewise.
	* testsuite/21_strings/c_strings/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/char/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/char/57704.cc:
	Likewise.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Likewise.
	* testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Likewise.

	* doc/xml/manual/test.xml: Fix typo.

From-SVN: r241069
2016-10-12 16:13:06 +00:00
Jonathan Wakely
e7722f1106 Define std::sample for C++17
* doc/xml/manual/status_cxx2017.xml: Add std::sample status.
	* doc/html/*: Regenerate.
	* include/experimental/algorithm (__sample): Move to bits/stl_algo.h
	and into namespace std.
	* include/bits/stl_algo.h (__sample): Define here. Fix invalid use
	of input iterator. Defend against overloaded comma operator.
	(sample): Define for C++17.
	* testsuite/25_algorithms/sample/1.cc: New test.

From-SVN: r241062
2016-10-12 16:26:48 +01:00
Jonathan Wakely
432b6d9572 Make test helper work with non-copyable types
* testsuite/util/testsuite_common_types.h
	(bitwise_assignment_operators): Use direct-initialization for C++11
	and later, to avoid CopyConstructible requirement.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Adjust expected errors and line numbers.

From-SVN: r241047
2016-10-12 14:30:49 +01:00
Jonathan Wakely
cfbdc34f25 Simplify std::call_once implementation
* include/std/mutex [_GLIBCXX_HAVE_TLS] (_Once_call): Remove.
	(call_once) [_GLIBCXX_HAVE_TLS]: Simplify by removing _Once_call.

From-SVN: r241034
2016-10-12 13:16:15 +01:00
Jonathan Wakely
08a53a2eda Add missing return to uninitialized_default_construct_n
* include/bits/stl_uninitialized.h
	(__uninitialized_default_novalue_n_1<true>): Add missing return.
	* testsuite/20_util/specialized_algorithms/memory_management_tools/
	1.cc: Check return values of uninitialized_xxx_n algorithms.

From-SVN: r241033
2016-10-12 12:20:35 +01:00
Jonathan Wakely
40571365a0 Remove 'return' from noreturn function
* libsupc++/nested_exception.h (throw_with_nested): Remove return.

From-SVN: r241032
2016-10-12 12:20:29 +01:00
Jonathan Wakely
164b41ebf3 Do not copy std:call_once arguments (LWG 2442)
* doc/xml/manual/intro.xml: Document LWG 2442 status.
	* include/std/mutex [_GLIBCXX_HAVE_TLS] (__once_call_impl): Remove.
	[_GLIBCXX_HAVE_TLS] (_Once_call): Declare primary template and define
	partial specialization to unpack args and forward to std::invoke.
	(call_once) [_GLIBCXX_HAVE_TLS]: Use forward_as_tuple and _Once_call
	instead of __bind_simple and __once_call_impl.
	(call_once) [!_GLIBCXX_HAVE_TLS]: Use __invoke instead of
	__bind_simple.
	* testsuite/30_threads/call_once/dr2442.cc: New test.

From-SVN: r241031
2016-10-12 12:20:25 +01:00
Jonathan Wakely
4bb4acee68 Optimise std::list::assign(initializer_list<T>) slightly
* include/bits/stl_list.h (assign(initializer_list<value_type>)): Call
	_M_assign_dispatch directly with correct tag.

From-SVN: r240984
2016-10-11 11:33:41 +01:00
Jonathan Wakely
0470fad0d6 Simplify std::rethrow_if_nested definition
* doc/xml/manual/intro.xml: Document LWG 2484 status.
	* libsupc++/nested_exception.h (_Throw_with_nested_impl)
	(_Throw_with_nested_helper): Remove.
	(__throw_with_nested_impl): New overloaded functions to implement
	throw_with_nested logic.
	(throw_with_nested): Call __throw_with_nested_impl.
	(_Rethrow_if_nested_impl): Remove
	(__rethrow_if_nested_impl): New overloaded functions to implement
	rethrow_if_nested logic.
	(rethrow_if_nested): Call __rethrow_if_nested_impl.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc: Test
	problem cases from LWG 2484.

From-SVN: r240983
2016-10-11 11:33:36 +01:00
Jonathan Wakely
bf1de1ac98 Enable printers and xmethods for std::__cxx11::list
* python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
	Register printer for std::__cxx11::list.
	* python/libstdcxx/v6/xmethods.py (ListMethodsMatcher.match): Match
	std::__cxx11::list as well as std::list.

From-SVN: r240982
2016-10-11 11:33:29 +01:00
Jonathan Wakely
7571121f10 Remove redundant const qualifliers from string_view
* include/experimental/string_view (basic_string_view::_S_compare):
	Remove redundant const from return type.
	* include/std/string_view (basic_string_view:_S_compare): Likewise.

From-SVN: r240981
2016-10-11 11:33:24 +01:00
Jonathan Wakely
2c15eace95 More noexcept for standard mutex types and locks
* include/bits/std_mutex.h (mutex::native_handle)
	(lock_guard(mutex_type&, adopt_lock_t)
	(unique_lock(mutex_type&, adopt_lock_t): Add noexcept.
	* include/std/mutex (recursive_mutex, timed_mutex)
	(recursive_timed_mutex): Likewise.

From-SVN: r240980
2016-10-11 11:33:16 +01:00
Jonathan Wakely
5c24897577 Improve docs on libstdc++ source-code layout
* doc/xml/manual/appendix_contributing.xml (contrib.organization):
	Replace <literallayout> with nested <variablelist> elements. Update
	some more outdated text.
	* doc/html/*: Regenerate.

From-SVN: r240952
2016-10-10 23:34:17 +01:00
Ville Voutilainen
1725d05d19 Make any's copy assignment operator exception-safe,
don't copy the underlying value when any is moved,
make in_place constructors explicit.
* include/std/any (any(in_place_type_t<_ValueType>, _Args&&...)):
Make explicit.
(any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...)):
Likewise.
(operator=(const any&)): Make strongly exception-safe.
(operator=(any&&)): reset() unconditionally in the case where
rhs has a value.
(operator=(_ValueType&&)): Indent the return type.
(_Manager_internal<_Tp>::_S_manage): Move in _Op_xfer, don't copy.
* testsuite/20_util/any/assign/2.cc: Adjust.
* testsuite/20_util/any/assign/exception.cc: New.
* testsuite/20_util/any/cons/2.cc: Adjust.
* testsuite/20_util/any/cons/explicit.cc: New.
* testsuite/20_util/any/misc/any_cast_neg.cc: Ajust.

From-SVN: r240951
2016-10-11 01:08:58 +03:00
Jonathan Wakely
db62593447 Update docs on libstdc++ source-code layout
* doc/xml/manual/appendix_contributing.xml (contrib.organization):
	Describe other subdirectories and add markup. Remove outdated
	reference to check-script target.
	* doc/html/*: Regenerate.

From-SVN: r240946
2016-10-10 19:57:15 +01:00
Jonathan Wakely
e2be44770c Correct C++11 implementation status docs
* doc/xml/manual/status_cxx2011.xml: Correct C++11 status.

From-SVN: r240944
2016-10-10 19:39:18 +01:00
Jonathan Wakely
a3dbb63597 Use noexcept instead of _GLIBCXX_USE_NOEXCEPT
* libsupc++/eh_ptr.cc (exception_ptr): Replace _GLIBCXX_USE_NOEXCEPT
	with noexcept.

From-SVN: r240943
2016-10-10 19:32:40 +01:00
Jonathan Wakely
40962ac03a Minor simplification to std::_Bind_result helpers
* include/std/functional (_Bind_result::__enable_if_void): Use alias
	template instead of class template.
	(_Bind_result::__disable_if_void): Likewise.
	(_Bind_result::__call): Adjust uses of __enable_if_void and
	__disable_if_void.

From-SVN: r240940
2016-10-10 17:15:52 +01:00
Jonathan Wakely
9e023e3321 Implement constexpr std::addressof for C++17
* doc/xml/manual/intro.xml: Document DR 2296 status.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* include/bits/move.h (__addressof): Add _GLIBCXX_CONSTEXPR and
	call __builtin_addressof.
	(addressof): Add _GLIBCXX17_CONSTEXPR.
	* testsuite/20_util/addressof/requirements/constexpr.cc: New test.
	* testsuite/20_util/forward/c_neg.cc: Adjust dg-error lineno.
	* testsuite/20_util/forward/f_neg.cc: Likewise.

From-SVN: r240929
2016-10-10 16:34:28 +01:00
Jonathan Wakely
46942c8101 Define std::allocator<T>::is_always_equal
* include/bits/allocator.h (allocator<T>::is_always_equal): Define.
	* testsuite/20_util/allocator/requirements/typedefs.cc: Test for
	is_always_equal.
	* testsuite/util/testsuite_allocator.h
	(uneq_allocator::is_always_equal): Define as false_type.

From-SVN: r240920
2016-10-10 13:17:45 +01:00
Jonathan Wakely
f2e79496bf LWG 2733, LWG 2759 reject bool in gcd and lcm
* include/experimental/numeric (gcd, lcm): Make bool arguments
	ill-formed.
	* include/std/numeric (gcd, lcm): Likewise.
	* testsuite/26_numerics/gcd/gcd_neg.cc: New test.
	* testsuite/26_numerics/lcm/lcm_neg.cc: New test.

From-SVN: r240919
2016-10-10 13:17:34 +01:00
Jonathan Wakely
208b8b69b6 Add noexcept to enable_shared_from_this::weak_from_this
* include/bits/shared_ptr.h (enable_shared_from_this::weak_from_this):
	Add noexcept.
	* include/bits/shared_ptr_base.h
	(__enable_shared_from_this::weak_from_this): Likewise.
	* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
	Test exception-specification of weak_from_this.

From-SVN: r240917
2016-10-10 12:44:05 +01:00
Jason Merrill
36cbfdb066 Further P0135 refinement.
* call.c (build_user_type_conversion_1): Consider conversions from
	a single element in an initializer-list.
	(build_temp): Undo early_elide_copy change.
	(build_over_call): Check that we don't try to copy a TARGET_EXPR
	in C++17 mode.  Set user_conv_p here.
	(convert_like_real): Not here.
	(check_self_delegation): Split out from...
	(build_special_member_call): ...here.  Handle C++17 copy elision.
	* cvt.c (early_elide_copy): Remove.
	(ocp_convert): Undo early_elide_copy change.
	* except.c (build_throw): Likewise.
	* init.c (expand_default_init): Likewise.
	* typeck.c (cp_build_modify_expr): Likewise.

From-SVN: r240889
2016-10-08 12:23:26 -04:00
Jonathan Wakely
296002c6a1 Improve implementation-defined docs for libstdc++
* doc/xml/manual/status_cxx1998.xml: Improve documentation of
	implementation-defined properties.
	* doc/xml/manual/status_cxx2011.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.

From-SVN: r240869
2016-10-07 19:02:53 +01:00
Jonathan Wakely
873c7d5ade Implement std::has_unique_object_representations
* doc/xml/manual/status_cxx2017.xml: Update status.
	* include/std/type_traits (has_unique_object_representations): Define.
	* testsuite/20_util/has_unique_object_representations/value.cc: New.
	* testsuite/20_util/has_unique_object_representations/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/has_unique_object_representations/requirements/
	typedefs.cc: New.

From-SVN: r240868
2016-10-07 19:02:43 +01:00
Jonathan Wakely
937ec71aba Make std::scoped_allocator_adaptor's OUTERMOST recursive
* doc/xml/manual/status_cxx2011.xml: Update status.
	* include/std/scoped_allocator (__outer_allocator_t, __outermost_type):
	New helpers for recursive OUTERMOST.
	(__outermost): Use __outermost_type::_S_outermost.
	(__do_outermost, scoped_allocator_adaptor::__outermost_type): Remove.
	(scoped_allocator_adaptor::__outermost_alloc_traits): Use new
	__outermost_type helper.
	* testsuite/20_util/scoped_allocator/outermost.cc: New test.

From-SVN: r240844
2016-10-06 22:22:35 +01:00
Jonathan Wakely
aaae096a1a 70564 fix newly-added tests for not_fn
PR libstdc++/70564
	* testsuite/20_util/not_fn/1.cc: Fix test.
	* testsuite/experimental/functional/not_fn.cc: Likewise.

From-SVN: r240784
2016-10-05 13:40:31 +01:00
Jonathan Wakely
92805612f4 PR 70101 fix allocator-extended ctors for std::priority_queue
PR libstdc++/70101
	* include/bits/stl_queue.h (priority_queue): Fix allocator-extended
	constructors.
	* testsuite/23_containers/priority_queue/allocator.cc: New test.

From-SVN: r240781
2016-10-05 13:01:57 +01:00
Jonathan Wakely
a2a64b499a 77864 Fix noexcept conditions for map/set default constructors
PR libstdc++/77864
	* include/bits/stl_map.h (map::map()): Use nothrow constructibility
	of comparison function in conditional noexcept.
	* include/bits/stl_multimap.h (multimap::multimap()): Likewise.
	* include/bits/stl_multiset.h (multiset::multiset()): Likewise.
	* include/bits/stl_set.h (set::set()): Likewise.
	* testsuite/23_containers/map/cons/noexcept_default_construct.cc:
	New test.
	* testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
	Likewise.
	* testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
	Likewise.
	* testsuite/23_containers/set/cons/noexcept_default_construct.cc:
	Likewise.

From-SVN: r240780
2016-10-05 13:01:51 +01:00
Jonathan Wakely
d72d690a92 Remove invalid alias declaration from _Node_handle
* include/bits/node_handle.h (_Node_handle): Remove invalid and unused
	alias declaration.

From-SVN: r240779
2016-10-05 13:01:44 +01:00
Jonathan Wakely
78ec9c15be PR 70564 disambiguate constructors for not_fn call wrapper
PR libstdc++/70564
	* include/experimental/functional (_Not_fn): Remove.
	(not_fn): Use std::_Not_fn.
	* include/std/functional (_Not_fn): Add second parameter to
	disambiguate copying from initialization by not_fn. Define for C++14.
	(not_fn): Add second argument to initialization.
	* testsuite/20_util/not_fn/1.cc: Copy call wrapper using
	direct-initialization.

From-SVN: r240778
2016-10-05 13:01:36 +01:00
François Dumont
38aee22c7d shared_ptr.cc (mask, [...]): Move declaration...
2016-10-03  François Dumont  <fdumont@gcc.gnu.org>

	* src/c++11/shared_ptr.cc (mask, invalid, get_mutex): Move
	declaration...
	* src/c++11/mutex_pool.h: ... here. New.
	* src/c++11/debug.cc: Use latter.

From-SVN: r240732
2016-10-03 20:23:13 +00:00
Jonathan Wakely
606dda21c8 Define std::gcd and std::lcm for C++17
* doc/xml/manual/status_cxx2017.xml: Update gcd/lcm status.
	* doc/html/*: Regenerate.
	* include/experimental/numeric (__abs): Move to <numeric>.
	(gcd, lcm): Use __detail::gcd and __detail::lcm.
	* include/std/numeric (__detail::__abs_integral)
	(__detail::__gcd, __detail::__lcm): Define.
	(gcd, lcm): Define for C++17.
	* testsuite/26_numerics/gcd/1.cc: New test.
	* testsuite/26_numerics/lcm/1.cc: New test.
	* testsuite/experimental/numeric/gcd.cc: Swap contents with ...
	* testsuite/experimental/numeric/lcd.cc: ... this.

From-SVN: r240723
2016-10-03 18:01:10 +01:00
Jonathan Wakely
e347987da8 Fix libstdc++ versioned namespace build
PR libstdc++/68323
	PR libstdc++/77794
	* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
	__cxa_thread_atexit and __gnu_cxx::__freeres.
	* include/Makefile.am: Add <experimental/bits/lfts_config.h>
	* include/Makefile.in: Regenerate.
	* include.bits/basic_string.h: Fix nesting of versioned namespaces.
	* include/bits/c++config: Declare versioned namespaces for literals.
	* include/bits/regex.h (basic_regex, match_results): Add workarounds
	for PR c++/59256.
	* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
	* include/std/chrono: Likewise.
	* include/std/complex: Likewise.
	* include/std/string_view: Likewise.
	* include/std/variant: Likewise. Add workaround for PR c++/59256.
	* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
	* include/experimental/bits/lfts_config.h: Declare versioned
	namespaces.
	* include/experimental/algorithm: Include
	<experimental/bits/lfts_config.h>.
	* include/experimental/any: Likewise.
	* include/experimental/bits/erase_if.h: Likewise.
	* include/experimental/chrono: Likewise.
	* include/experimental/functional: Likewise.
	* include/experimental/memory_resource: Likewise.
	* include/experimental/optional: Likewise.
	* include/experimental/propagate_const: Likewise.
	* include/experimental/random: Likewise.
	* include/experimental/ratio: Likewise.
	* include/experimental/system_error: Likewise.
	* include/experimental/tuple: Likewise.
	* include/experimental/type_traits: Likewise.
	* include/experimental/utility: Likewise.
	* include/experimental/string_view: Likewise. Fix nesting of
	versioned namespaces.
	* include/experimental/bits/string_view.tcc: Reopen inline namespace
	for non-inline function definitions.
	* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
	* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
	* testsuite/experimental/propagate_const/assignment/move_neg.cc:
	Likewise.
	* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
	* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

From-SVN: r240714
2016-10-03 15:35:28 +01:00
Jonathan Wakely
6a0d23af49 Ensure "C++" language linkage for std::abs overloads
PR libstdc++/77814
	* include/bits/std_abs.h: Use "C++" language linkage.
	* testsuite/17_intro/headers/c++2011/linkage.cc: Move <complex.h> to
	the end. Add <stdalign.h>.

From-SVN: r240710
2016-10-03 12:50:46 +01:00
Ville Voutilainen
3fe2ddae4b re PR libstdc++/77802 (Boost Fiber doesn't compile)
PR libstdc++/77802
    * testsuite/20_util/tuple/77802.cc: New.

    Revert:
    2016-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
    Implement LWG 2729 for tuple.
    * include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
    Suppress conditionally.
    (_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
    (__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
    (_Tuple_impl(const _Head&)): Constrain.
    (_Tuple_impl(_UHead&&)): Likewise.
    (_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
    (_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
    (_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
    (operator=(const tuple&)): Enable conditionally.
    (operator=(tuple&&)): Suppress conditionally.
    (operator=(const tuple<_UElements...>&)): Constrain.
    (operator=(tuple<_UElements...>&&)): Likewise.
    (operator=(const tuple&)): Enable conditionally (2-param tuple).
    (operator=(tuple&&)): Suppress conditionally (2-param tuple).
    (operator=(const tuple<_U1, _U2>&)): Constrain.
    (operator=(tuple<_U1, _U2>&&)): Likewise.
    (operator=(const pair<_U1, _U2>&)): Likewise.
    (operator=(pair<_U1, _U2>&&)): Likewise.
    * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
    * testsuite/20_util/tuple/tuple_traits.cc: New.

From-SVN: r240709
2016-10-03 14:06:53 +03:00
Jonathan Wakely
36105dbdab libstdc++/77795 Only declare ::gets for C++98 and C++11
PR libstdc++/77795
	* acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check
	for gets.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare
	for C++98 and C++11.
	* include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise.
	* testsuite/27_io/headers/cstdio/functions_neg.cc: New test.

From-SVN: r240672
2016-09-30 19:28:53 +01:00
Jonathan Wakely
37b204de60 Implement LWG 2192 and LWG 2294 for std::abs
* doc/xml/manual/intro.xml: Document LWG 2192 changes.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add bits/std_abs.h.
	* include/Makefile.in: Regenerate.
	* include/bits/std_abs.h: New header defining all required overloads
	of std::abs in one place (LWG 2294).
	* include/c_global/cmath (abs(double), abs(float), abs(long double)):
	Move to bits/std_abs.h.
	(abs<_Tp>(_Tp)): Remove.
	* include/c_global/cstdlib (abs(long), abs(long long), abs(__int<N>)):
	Move to bits/std_abs.h.
	* testsuite/26_numerics/headers/cmath/dr2192.cc: New test.
	* testsuite/26_numerics/headers/cmath/dr2192_neg.cc: New test.
	* testsuite/26_numerics/headers/cstdlib/dr2192.cc: New test.
	* testsuite/26_numerics/headers/cstdlib/dr2192_neg.cc: New test.

From-SVN: r240660
2016-09-30 17:07:43 +01:00
Jonathan Wakely
9e28a77462 Remove use of std::abs in experimental::{gcd,lcm}
PR libstdc++/77801
	* include/experimental/numeric: Include <numeric>.
	(__abs): Define.
	(gcd, lcm): Use __abs instead of std::abs.
	* testsuite/experimental/numeric/77801.cc: New test.
	* testsuite/experimental/numeric/gcd.cc: Test unsigned inputs.
	* testsuite/experimental/numeric/lcm.cc: Likewise.

From-SVN: r240656
2016-09-30 14:43:37 +01:00
Ville Voutilainen
a181f67231 Make optional::reset noexcept, make optional::value work in constant expressions.
Make optional::reset noexcept, make optional::value
    work in constant expressions.
    * include/std/optional (_M_get): Make constexpr.
    (reset): Make noexcept.
    * testsuite/20_util/optional/assignment/7.cc: New.
    * testsuite/20_util/optional/observers/6.cc: New.

From-SVN: r240623
2016-09-29 18:20:28 +03:00
Jonathan Wakely
998e01a6d5 Define C++17 std::hypot without _GLIBCXX_USE_C99_MATH_TR1
* include/c_global/cmath (hypot, __hypot3): Move C++17 overloads
	outside _GLIBCXX_USE_C99_MATH_TR1 condition.

From-SVN: r240620
2016-09-29 14:25:48 +01:00
Alan Modra
6d49b790fd Disable .gnu.attributes tags in compatibility-ldbl.o
compatibility-ldbl.o is compiled with -mlong-double-64.  When
long double .gnu.attributes tags are checked by the linker, it
complains about the mismatch between this file and others in
libstdc++.

	* configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST.
	* src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo):
	Use LONG_DOUBLE_COMPAT_FLAGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r240602
2016-09-29 07:33:17 +09:30
Jonathan Wakely
b236debd3b * include/std/chrono (system_clock): Fix typo in comment.
From-SVN: r240589
2016-09-28 19:04:23 +01:00
Jonathan Wakely
fd5effb17e Check for overflow in filesystem::last_write_time
* include/experimental/bits/fs_fwd.h (file_time_type): Simplify
	definition.
	* src/filesystem/ops.cc (file_time): Take error_code parameter and
	check for overflow.
	(do_copy_file, last_write_time): Pass error_code in file_time calls.
	* testsuite/experimental/filesystem/operations/last_write_time.cc:
	New.
	* testsuite/util/testsuite_fs.h (scoped_file): Define RAII helper.

From-SVN: r240587
2016-09-28 19:02:25 +01:00
Jonathan Wakely
1b4be62ad3 libstdc++/77686 use may_alias for std::function storage
PR libstdc++/77686
	* include/std/functional (_Any_data): Add may_alias attribute.

From-SVN: r240567
2016-09-28 11:57:46 +01:00
Jonathan Wakely
4940de303c Define feature macro and update C++17 library status
* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/*: Regenerate.
	* include/std/functional (__cpp_lib_boyer_moore_searcher): Define.
	* testsuite/20_util/function_objects/searchers.cc: Test feature macro.

From-SVN: r240550
2016-09-27 16:39:51 +01:00
Jonathan Wakely
b658669de0 Define 3-argument overloads of std::hypot for C++17 (P0030R1)
* doc/xml/manual/status_cxx2017.xml: Update status.
	* include/c_global/cmath (hypot): Add three-dimensional overloads.
	* testsuite/26_numerics/headers/cmath/hypot.cc: New.

From-SVN: r240547
2016-09-27 16:14:24 +01:00
Ville Voutilainen
71ade764ad re PR libstdc++/77727 (Unwrapping std::optional constructor is not working for non-transferable object)
PR libstdc++/77727
    * include/std/optional (optional(const optional<_Up>&)):
    Default-initialize the base and use emplace.
    (optional(optional<_Up>&&)): Likewise.
    * testsuite/20_util/optional/cons/77727.cc: New.

From-SVN: r240511
2016-09-26 23:51:42 +03:00
François Dumont
f2fe9e0a69 2016-09-26 François Dumont <fdumont@gcc.gnu.org>
* include/debug/safe_base.h
	(_Safe_iterator_base::_M_detach_single): Make public.

From-SVN: r240510
2016-09-26 20:32:39 +00:00
Jonathan Wakely
1a08d2da0e Remove redefinition of __cpp_lib_array_constexpr
* include/bits/range_access.h (__cpp_lib_array_constexpr): Do not
	redefine macro defined in <bits/stl_iterator.h>.

From-SVN: r240488
2016-09-26 11:17:53 +01:00
Jonathan Wakely
976160b962 Add assertions to extract(const_iterator) functions
* include/bits/stl_map.h (map::extract(const_iterator)): Assert that
	iterator is not past-the-end.
	* include/bits/stl_multimap.h (multimap::extract(const_iterator)):
	Likewise.
	* include/bits/stl_multiset.h (multiset::extract(const_iterator)):
	Likewise.
	* include/bits/stl_set.h (set::extract(const_iterator)): Likewise.
	* include/bits/unordered_map.h (unordered_map::extract(const_iterator))
	(unordered_multimap::extract(const_iterator)): Likewise.
	* include/bits/unordered_set.h (unordered_set::extract(const_iterator))
	(unordered_multiset::extract(const_iterator)): Likewise.

From-SVN: r240487
2016-09-26 11:17:48 +01:00
Ville Voutilainen
a38814c003 re PR libstdc++/77717 (testsuite/21_strings/basic_string_view/operations/compare/char/1.cc makes undefined memcmp call)
PR libstdc++/77717
	* testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
	Fix an out-of-bounds access.

From-SVN: r240486
2016-09-26 12:46:19 +03:00
Marek Polacek
81fea426da Implement -Wimplicit-fallthrough.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r240485
2016-09-26 09:42:50 +00:00
François Dumont
d8bbd665a1 debug.cc: Include debug/vector.
2016-09-25  François Dumont  <fdumont@gcc.gnu.org>

	* src/c++11/debug.cc: Include debug/vector. Include cctype. Remove
	functional.
	(get_safe_base_mutex): Get mutex based on address lowest non nil bits.
	* testsuite/23_containers/vector/debug/mutex_association.cc: New.

From-SVN: r240479
2016-09-25 20:26:02 +00:00
François Dumont
5d04532430 bitset (bitset::reference::reference(const _Base_ref&, bitset*)): Remove __unused__ attribute.
2016-09-25  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/bitset (bitset::reference::reference(const _Base_ref&,
	bitset*)): Remove __unused__ attribute.
	* include/debug/safe_base.h (_Safe_iterator_base): Make
	_Safe_sequence_base a friend.
	(_Safe_iterator_base::_M_attach): Make protected.
	(_Safe_iterator_base::_M_attach_single): Likewise.
	(_Safe_iterator_base::_M_detach): Likewise.
	(_Safe_iterator_base::_M_detach_single): Likewise.
	(_Safe_sequence_base): Make _Safe_iterator_base a friend.
	(_Safe_sequence_base::_Safe_sequence_base(_Safe_sequence_base&&)): New.
	(_Safe_sequence_base::_M_swap): Make protected.
	(_Safe_sequence_base::_M_attach): Make private.
	(_Safe_sequence_base::_M_attach_single): Likewise.
	(_Safe_sequence_base::_M_detach): Likewise.
	(_Safe_sequence_base::_M_detach_single): Likewise.
	* include/debug/safe_container.h
	(_Safe_container::_Safe_container(_Safe_container&&)): Make default.
	* include/debug/safe_iterator.h
	(_Safe_iterator::operator++()): Name __scoped_lock instance.
	* include/debug/safe_iterator.tcc: Remove trailing line.
	* include/debug/safe_unordered_base.h
	(_Safe_local_iterator_base::_M_attach): Make protected.
	(_Safe_local_iterator_base::_M_attach_single): Likewise.
	(_Safe_local_iterator_base::_M_detach): Likewise.
	(_Safe_local_iterator_base::_M_detach_single): Likewise.
	(_Safe_unordered_container_base): Make _Safe_local_iterator_base friend.
	(_Safe_unordered_container_base::_M_attach_local): Make private.
	(_Safe_unordered_container_base::_M_attach_local_single): Likewise.
	(_Safe_unordered_container_base::_M_detach_local): Likewise.
	(_Safe_unordered_container_base::_M_detach_local_single): Likewise.

From-SVN: r240478
2016-09-25 20:15:21 +00:00
François Dumont
edc69abbe1 algo.h: Generalize usage of std::__iterator_category.
2016-09-25  François Dumont  <fdumont@gcc.gnu.org>

	* include/parallel/algo.h: Generalize usage of std::__iterator_category.
	Adjust whitespaces.

From-SVN: r240473
2016-09-25 15:23:45 +00:00
Jonathan Wakely
1319041924 Avoid reallocation for basic_string::clear()
PR libstdc++/56166
	PR libstdc++/77582
	* include/bits/basic_string.h (basic_string::clear()): Drop reference
	and use empty rep.
	* include/ext/rc_string_base.h (__rc_string_base::_M_clear()):
	Likewise.
	* testsuite/21_strings/basic_string/56166.cc: New.
	* testsuite/ext/vstring/modifiers/clear/56166.cc: New.

From-SVN: r240447
2016-09-23 18:25:34 +01:00
Jonathan Wakely
a922c5ff6f Optimize truncating a basic_string
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::erase(size_type, size_type)): Add fast path for
	truncating the string, by calling _M_set_length directly.
	(basic_string::erase(__const_iterator, __const_iterator)): Likewise.
	* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::resize(size_type, _CharT)): Likewise.

From-SVN: r240446
2016-09-23 18:25:23 +01:00
Jason Merrill
7be8d66369 * configure.ac: Define HAVE_MEMALIGN for newlib.
From-SVN: r240435
2016-09-23 10:34:51 -04:00
Sebastian Huber
320c7be3ff [RTEMS] Always use atomic builtins for libstdc++
libstdc++-v3/
	* config/cpu/m68k/atomicity.h: Adjust comment.
	* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Honor
	explicit atomicity_dir setup via configure.host.
	* configure.host (rtems-*): Set atomicity_dir.
	* configure: Regenerate.

From-SVN: r240387
2016-09-23 06:58:00 +00:00
Jonathan Wakely
2dbe56bdfb Implement C++17 node extraction and insertion (P0083R5)
* doc/xml/manual/status_cxx2017.xml: Document status.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add bits/node_handle.h and reorder.
	* include/Makefile.in: Regenerate.
	* include/bits/hashtable.h (_Hashtable::node_type)
	(_Hashtable::insert_return_type, _Hashtable::_M_reinsert_node)
	(_Hashtable::_M_reinsert_node_multi, _Hashtable::extract)
	(_Hashtable::_M_merge_unique, _Hashtable::_M_merge_multi): Define.
	(_Hash_merge_helper): Define primary template.
	* include/bits/node_handle.h: New header.
	* include/bits/stl_map.h (map): Declare _Rb_tree_merge_helper as
	friend.
	(map::node_type, map::insert_return_type, map::extract, map::merge)
	(map::insert(node_type&&), map::insert(const_iterator, node_type&&)):
	Define new members.
	(_Rb_tree_merge_helper): Specialize for map.
	* include/bits/stl_multimap.h (multimap): Declare _Rb_tree_merge_helper
	as friend.
	(multimap::node_type, multimap::extract, multimap::merge)
	(multimap::insert(node_type&&))
	(multimap::insert(const_iterator, node_type&&)): Define.
	(_Rb_tree_merge_helper): Specialize for multimap.
	* include/bits/stl_multiset.h (multiset): Declare _Rb_tree_merge_helper
	as friend.
	(multiset::node_type, multiset::extract, multiset::merge)
	(multiset::insert(node_type&&))
	(multiset::insert(const_iterator, node_type&&)): Define.
	* include/bits/stl_set.h (set): Declare _Rb_tree_merge_helper as
	friend.
	(set::node_type, set::insert_return_type, set::extract, set::merge)
	(set::insert(node_type&&), set::insert(const_iterator, node_type&&)):
	Define.
	(_Rb_tree_merge_helper): Specialize for set.
	* include/bits/stl_tree.h (_Rb_tree): Declare _Rb_tree<> as friend.
	(_Rb_tree::node_type, _Rb_tree::insert_return_type)
	(_Rb_tree::_M_reinsert_node_unique, _Rb_tree::_M_reinsert_node_equal)
	(_Rb_tree::_M_reinsert_node_hint_unique)
	(_Rb_tree::_M_reinsert_node_hint_equal, _Rb_tree::extract)
	(_Rb_tree::_M_merge_unique, _Rb_tree::_M_merge_equal): Define.
	(_Rb_tree_merge_helper): Specialize for multiset.
	* include/bits/unordered_map.h (unordered_map): Declare
	unordered_map<> and unordered_multimap<> as friends.
	(unordered_map::node_type, unordered_map::insert_return_type)
	(unordered_map::extract, unordered_map::merge)
	(unordered_map::insert(node_type&&))
	(unordered_map::insert(const_iterator, node_type&&))
	(unordered_multimap): Declare _Hash_merge_helper as friend.
	(unordered_multimap::node_type, unordered_multimap::extract)
	(unordered_multimap::merge, unordered_multimap::insert(node_type&&))
	(unordered_multimap::insert(const_iterator, node_type&&)): Define.
	(_Hash_merge_helper): Specialize for unordered maps and multimaps.
	* include/bits/unordered_set.h (unordered_set, unordered_multiset):
	Declare _Hash_merge_helper as friend.
	(unordered_set::node_type, unordered_set::insert_return_type)
	(unordered_set::extract, unordered_set::merge)
	(unordered_set::insert(node_type&&))
	(unordered_set::insert(const_iterator, node_type&&)): Define.
	(unordered_multiset::node_type, unordered_multiset::extract)
	(unordered_multiset::merge, unordered_multiset::insert(node_type&&))
	(unordered_multiset::insert(const_iterator, node_type&&)): Define.
	(_Hash_merge_helper): Specialize for unordered sets and multisets.
	* include/debug/map.h (map): Add using declarations or forwarding
	functions for new members.
	* include/debug/map.h (multimap): Likewise.
	* include/debug/map.h (multiset): Likewise.
	* include/debug/map.h (set): Likewise.
	* include/debug/unordered_map (unordered_map, unordered_multimap):
	Likewise.
	* include/debug/unordered_set( unordered_set, unordered_multiset):
	Likewise.
	* python/libstdcxx/v6/printers.py (get_value_from_aligned_membuf): New
	helper function.
	(get_value_from_list_node, get_value_from_Rb_tree_node): Use helper.
	(StdNodeHandlePrinter): Define printer for node handles.
	(build_libstdcxx_dictionary): Register StdNodeHandlePrinter.
	* testsuite/23_containers/map/modifiers/extract.cc: New.
	* testsuite/23_containers/map/modifiers/merge.cc: New.
	* testsuite/23_containers/multimap/modifiers/extract.cc: New.
	* testsuite/23_containers/multimap/modifiers/merge.cc: New.
	* testsuite/23_containers/multiset/modifiers/extract.cc: New.
	* testsuite/23_containers/multiset/modifiers/merge.cc: New.
	* testsuite/23_containers/set/modifiers/extract.cc: New.
	* testsuite/23_containers/set/modifiers/merge.cc: New.
	* testsuite/23_containers/unordered_map/modifiers/extract.cc: New.
	* testsuite/23_containers/unordered_map/modifiers/merge.cc: New.
	* testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
	New.
	* testsuite/23_containers/unordered_multimap/modifiers/merge.cc: New.
	* testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
	New.
	* testsuite/23_containers/unordered_multiset/modifiers/merge.cc: New.
	* testsuite/23_containers/unordered_set/modifiers/extract.cc: New.
	* testsuite/23_containers/unordered_set/modifiers/merge.cc: New.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
	dg-error lineno.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Test node handles.

From-SVN: r240363
2016-09-22 14:58:49 +01:00
Ville Voutilainen
8a4c4f1273 Fix tests on old arm platforms for optional.
* testsuite/20_util/optional/77288.cc: Don't use exception_ptr.

From-SVN: r240347
2016-09-22 14:01:29 +03:00
Jonathan Wakely
6fdc74c91b Update pretty printer for std::variant
* python/libstdcxx/v6/printers.py (StdVariantPrinter): Adjust for
	recent change to _Variant_storage.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Test variant with
	reference type.

From-SVN: r240345
2016-09-22 11:06:41 +01:00
Jonathan Wakely
64626fcaaa Always qualify std::forward in <variant>
* include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
	std::forward and ::new. Cast pointer to void*.
	* include/std/variant (_Variant_storage, _Union, _Variant_base)
	(__access, __visit_invoke, variant, visit): Qualify std::forward.
	* testsuite/20_util/variant/compile.cc: Test for ADL problems.

From-SVN: r240344
2016-09-22 10:56:54 +01:00
Tim Shen
c42bc5d73b variant (variant::operator=): Fix assignment on references.
* libstdc++-v3/include/std/variant (variant::operator=): Fix assignment
	on references.
	* libstdc++-v3/testsuite/20_util/variant/compile.cc: Add test.

From-SVN: r240343
2016-09-22 08:45:55 +00:00
Tim Shen
41501d1ae7 re PR libstdc++/77641 (std::variant copy-initialization fails for type with non-trivial constexpr ctor)
PR libstdc++/77641
	* include/std/variant (_Variant_storage::_Variant_storage):
	Change _Variant_storage's union to be default constructible.
	* testsuite/20_util/variant/compile.cc: New test.

From-SVN: r240340
2016-09-22 03:15:58 +00:00
Ville Voutilainen
b641f833ba re PR libstdc++/77288 (Std::experimental::optional::operator= implementation is broken in gcc 6.1)
PR libstdc++/77288
	* include/std/optional (__is_optional_impl, __is_optional): Remove.
	(__converts_from_optional, __assigns_from_optional): New.
	(optional(_Up&&)): Use is_same instead of __is_optional.
	(optional(const optional<_Up>&)): Constrain with
	__converts_from_optional.
	(optional(optional<_Up>&&)): Likewise.
	(operator=(_Up&&)): Use is_same instead of __is_optional, check
	is_same and is_scalar.
	(operator=(const optional<_Up>&)): Constrain with
	__converts_from_optional and __assigns_from_optional.
	(operator=(optional<_Up>&&)): Likewise.
	* testsuite/20_util/optional/77288.cc: New.
	* testsuite/20_util/optional/cons/value.cc: Adjust.

From-SVN: r240324
2016-09-21 20:37:17 +03:00
Ville Voutilainen
5578678524 Implement LWG 2729 for tuple.
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
	Suppress conditionally.
	(_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
	(__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
	(_Tuple_impl(const _Head&)): Constrain.
	(_Tuple_impl(_UHead&&)): Likewise.
	(_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
	(_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
	(_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
	(operator=(const tuple&)): Enable conditionally.
	(operator=(tuple&&)): Suppress conditionally.
	(operator=(const tuple<_UElements...>&)): Constrain.
	(operator=(tuple<_UElements...>&&)): Likewise.
	(operator=(const tuple&)): Enable conditionally (2-param tuple).
	(operator=(tuple&&)): Suppress conditionally (2-param tuple).
	(operator=(const tuple<_U1, _U2>&)): Constrain.
	(operator=(tuple<_U1, _U2>&&)): Likewise.
	(operator=(const pair<_U1, _U2>&)): Likewise.
	(operator=(pair<_U1, _U2>&&)): Likewise.
	* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
	* testsuite/20_util/tuple/tuple_traits.cc: New.

From-SVN: r240323
2016-09-21 20:25:16 +03:00
Ville Voutilainen
f524d5b34a re PR libstdc++/77537 (pair constructors do not properly SFINAE)
PR libstdc++/77537
	Implement LWG 2729 for pair.
	* include/bits/stl_pair.h (_PCC): New.
	(_ConstructiblePair, _ImplicitlyConvertiblePair):
	Turn into static member functions of _PCC.
	(_MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Likewise.
	(_PCCP): New.
	(pair(const _T1&, const _T2&)): Adjust.
	(_PCCFP): New.
	(pair(const pair<_U1, _U2>&)): Adjust.
	(pair(_U1&&, const _T2&)): Likewise.
	(pair(const _T1&, _U2&&)): Likewise.
	(pair(_U1&&, _U2&&)): Likewise.
	(pair(pair<_U1, _U2>&&)): Likewise.
	(operator=(const pair&)): Make conditionally deleted.
	(operator=(pair&&)): Make conditionally suppressed.
	(operator=(const pair<_U1, _U2>&)): Constrain.
	(operator=(pair<_U1, _U2>&&): Likewise.
	* include/std/type_traits (__nonesuch): New.
	* testsuite/20_util/pair/traits.cc: New.

From-SVN: r240322
2016-09-21 19:48:35 +03:00
Ville Voutilainen
377f30c00f re PR libstdc++/77619 (uninitialized_meow_construct and friends not exception safe)
PR libstdc++/77619
	* include/bits/stl_construct.h: (_Construct_novalue): New.
	(_Destroy_n_aux, _Destroy_n): New.
	* include/bits/stl_uninitialized.h: (type_traits):
	New include in C++11 mode.
	(__uninitialized_default_novalue_1): New.
	(__uninitialized_default_novalue_n_1): Likewise.
	(__uninitialized_default_novalue): Likewise.
	(__uninitialized_default_novalue_n): Likewise.
	(__uninitialized_copy_n_pair): Likewise.
	(uninitialized_default_construct):
	Use __uninitialized_default_novalue.
	(uninitialized_default_construct_n):
	Use __uninitialized_default_novalue_n.
	(uninitialized_value_construct): Use __uninitialized_default.
	(uninitialized_value_construct_n): Use __uninitialized_default_n.
	(uninitialized_move): Use uninitialized_copy.
	(uninitialized_move_n): Use __uninitialized_copy_n_pair.
	(destroy_at): Use _Destroy.
	(destroy): Likewise.
	(destroy_n): Likewise.
	* testsuite/20_util/specialized_algorithms/
	memory_management_tools/1.cc: Add tests for exceptions,
	add tests for trivial cases for construct and move.

From-SVN: r240264
2016-09-20 18:15:36 +03:00
Jonathan Wakely
564beb5f9b Replace casts with floordiv operator in Python xmethods
* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.__init__)
	(DequeWorkerBase.index, VectorWorkerBase.get): Use // for division.

From-SVN: r240258
2016-09-20 10:57:02 +01:00
Jonathan Wakely
d0f5943566 libstdc++/77645 fix deque and vector xmethods for Python 3
PR libstdc++/77645
	* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.__init__)
	(DequeWorkerBase.index, VectorWorkerBase.get): Cast results of
	division to int to work with Python 3.

From-SVN: r240241
2016-09-19 18:09:04 +01:00
Jonathan Wakely
ee1ab3e3c2 Make libstdc++ tests FAIL on Python errors
* testsuite/lib/gdb-test.exp (gdb-test): Fail if Python error occurs.

From-SVN: r240237
2016-09-19 16:59:04 +01:00
Jonathan Wakely
a0a1009abf Improve pretty printer for std::variant
* python/libstdcxx/v6/printers.py (SingleObjContainerPrinter): Allow
	display_hint to be set by subclasses.
	(StdVariantPrinter): Use array for display_hint. Adjust output to be
	more similar to std::any and std::optional output.
	(register_type_printers): Add type printers for basic_string_view
	typedefs and experimental::any. Adjust type printers for
	fundamentals_v1 templates to match fundamentals_v2 and later.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: New.

From-SVN: r240234
2016-09-19 16:49:27 +01:00
Jonathan Wakely
019270bcb3 libstdc++/77645 Fix xmethods for std::list
PR libstdc++/77645
	* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.index): Rename
	argument.
	(ListWorkerBase.get_value_from_node): Define new method.
	(ListFrontWorker.__call__, ListBackWorker.__call__): Use it.

From-SVN: r240233
2016-09-19 16:49:19 +01:00
Jonathan Wakely
0089537230 Define pretty printers for C++17 library components
* python/libstdcxx/v6/printers.py (StdVariantPrinter): Define.
	(StdExpAnyPrinter, StdExpOptionalPrinter, StdExpStringViewPrinter):
	Register for C++17 components in namespace std. Strip inline namespace
	from typename.

From-SVN: r240215
2016-09-17 16:20:23 +01:00
Jonathan Wakely
6ee3fd9742 Fix typo in Libstdc++ Profile Mode docs
* doc/xml/manual/profile_mode.xml: Fix typo.
	* doc/html/manual/profile_mode_devel.html: Regenerate.

From-SVN: r240204
2016-09-16 23:09:15 +01:00
Jonathan Wakely
84c08ec96a Replace modulus with mask operation in over-aligned new
2016-09-16  Jonathan Wakely  <jwakely@redhat.com>
	    Marc Glisse  <marc.glisse@inria.fr>

	* libsupc++/new_opa.cc [_GLIBCXX_HAVE_ALIGNED_ALLOC]
	(operator new(size_t, align_val_t)): Replace modulus operator with
	mask.

Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>

From-SVN: r240192
2016-09-16 19:09:14 +01:00
Jonathan Wakely
426042f5f2 Adjust arguments to aligned_alloc or posix_memalign
* libsupc++/new_opa.cc [_GLIBCXX_HAVE_POSIX_MEMALIGN] (aligned_alloc):
	Increase alignment if less than sizeof(void*).
	[_GLIBCXX_HAVE_ALIGNED_ALLOC] (operator new(size_t, align_val_t)):
	Increase size if not a multiple of alignment.

From-SVN: r240187
2016-09-16 13:11:19 +01:00
Jonathan Wakely
1b75c93601 Editorial fixes to libstdc++ debug mode docs
* doc/xml/manual/debug_mode.xml: Minor editorial fixes.
	* doc/html/*: Regenerate.

From-SVN: r240161
2016-09-15 11:30:58 +01:00
Jonathan Wakely
700e2faaf5 Fix testsuite to not increment bool
* testsuite/23_containers/vector/debug/insert6_neg.cc: Remove
	-Wno-deprecated.
	* testsuite/util/debug/checks.h (generate_unique<bool>): Specialize.

From-SVN: r240160
2016-09-15 11:30:52 +01:00
Jonathan Wakely
7a461e274c Reformat libstdc++-v3/ChangeLog to fit in 80 columns
From-SVN: r240159
2016-09-15 11:26:03 +01:00
Jonathan Wakely
0273c10e7b Fix testsuite to not increment bool
* testsuite/23_containers/vector/debug/insert6_neg.cc: Remove
	-Wno-deprecated.
	* testsuite/util/debug/checks.h (generate_unique<bool>): Specialize.

From-SVN: r240157
2016-09-15 11:18:38 +01:00
Marek Polacek
20a1e5b8c8 typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions.
* typeck.c (cp_build_unary_op): Diagnose incrementing boolean
	expressions.  Tweak an error message.

	* c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated.
	* c-c++-common/gomp/atomic-13.c: Likewise.
	* c-c++-common/gomp/atomic-14.c: Likewise.
	* g++.dg/cpp1y/lambda-init11.C: Remove invalid code.
	* g++.dg/cpp1z/bool-increment1.C: New test.
	* c-c++-common/pr60439.c: Add dg-warning.
	* g++.dg/expr/bitfield4.C: Likewise.
	* g++.dg/expr/bitfield5.C: Likewise.
	* g++.dg/expr/bitfield6.C: Likewise.
	* g++.dg/expr/bool1.C: Likewise.
	* g++.dg/expr/bool3.C: Likewise.
	* g++.dg/expr/lval3.C: Likewise.
	* g++.dg/expr/lval4.C: Likewise.
	* g++.old-deja/g++.jason/bool5.C: Likewise.
	* g++.dg/expr/bitfield3.C: Adjust dg-error.
	* g++.dg/other/error18.C: Likewise.
	* g++.dg/gomp/atomic-14.C: Likewise.
libgomp/
	* testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated.
libstdc++-v3/
	* testsuite/23_containers/vector/debug/insert6_neg.cc: Use
	-Wno-deprecated.

From-SVN: r240141
2016-09-14 17:46:59 +00:00
Christophe Lyon
13cddbc115 Fix dg-require before dg-run directives in testsuite.
libstdc++-v3/ChangeLog:

2016-09-14  Christophe Lyon  <christophe.lyon@linaro.org>

	* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
	Move dg-do directive before dg-skip.
	* testsuite/21_strings/debug/iterator_self_move_assign_neg.cc:
	Move dg-do directive before dg-require.
	* testsuite/21_strings/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/57779_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/60587_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert5_neg.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/irreflexive.cc: Likewise.
	* testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
	Likewise.
	* testsuite/25_algorithms/pop_heap/empty2_neg.cc: Likewise.
	* testsuite/25_algorithms/pop_heap/empty_neg.cc: Likewise.
	* testsuite/27_io/objects/char/12048-5.cc: Likewise.
	* testsuite/ext/special_functions/conf_hyperg/check_nan.cc: Likewise.
	* testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.

gcc/testsuite/ChangeLog:

2016-09-14  Christophe Lyon  <christophe.lyon@linaro.org>

	* g++.dg/cpp0x/lambda/lambda-mangle.C: Move dg-do directive before
	dg-require.
	* g++.dg/ext/builtin_alloca.C: Likewise.
	* g++.dg/template/spec35.C: Likewise.
	* gcc.dg/builtins-68.c: Likewise.
	* gcc.misc-tests/gcov-13.c: Likewise.
	* gcc.misc-tests/gcov-14.c: Likewise.

From-SVN: r240135
2016-09-14 15:37:23 +02:00
Ville Voutilainen
8e14a10cab Implement P0040R3, Extending memory management tools.
* include/bits/stl_uninitialized.h (utility): New include
	in C++17 mode.
	(uninitialized_default_construct): New.
	(uninitialized_default_construct_n): Likewise.
	(uninitialized_value_construct): Likewise.
	(uninitialized_value_construct_n): Likewise.
	(uninitialized_move): Likewise.
	(uninitialized_move_n): Likewise.
	(destroy_at, destroy, destroy_n): Likewise.
	* testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
	New.

From-SVN: r240122
2016-09-13 22:26:02 +03:00
Jason Merrill
a313485bbd * config/abi/pre/gnu.ver: Use [jmy] for size_t.
From-SVN: r240097
2016-09-12 14:20:46 -04:00
Ville Voutilainen
5e8037ba97 Implement P0253R1, Fixing a design mistake in the searchers interface in Library Fundamentals.
Implement P0253R1, Fixing a design mistake in the searchers
	interface in Library Fundamentals.
	* include/std/functional: (utility): New include in C++17 mode.
	(default_searcher): Use a pair as return type, adjust the definition.
	(boyer_moore_searcher): Likewise.
	(boyer_moore_horspool_searcher): Likewise.
	* testsuite/20_util/function_objects/searchers.cc: Adjust.

From-SVN: r240094
2016-09-12 18:48:32 +03:00
Ville Voutilainen
f82dfb8d4e Implement C++17 string searchers.
* include/std/functional: (unordered_map, vector): New includes
	in C++17 mode.
	(array, bits/stl_algo.h): Likewise.
	(default_searcher, __boyer_moore_map_base): New.
	(__boyer_moore_array_base, __is_std_equal_to): Likewise.
	(__boyer_moore_base_t, boyer_moore_searcher): Likewise.
	(boyer_moore_horspool_searcher, make_default_searcher): Likewise.
	(make_boyer_moore_searcher): Likewise.
	(make_boyer_moore_horspool_searcher): Likewise.
	* testsuite/20_util/function_objects/searchers.cc: New.

From-SVN: r240093
2016-09-12 18:48:07 +03:00
Matthew Wahab
684211e11b [libstdc++-v3] Fix dg-require before dg-run directives in testsuite.
* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
	Move dg-do directive before dg-require.
	* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: Likewise.
	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
	Likewise.
	* testsuite/22_locale/codecvt/utf8.cc: Likewise.
	* testsuite/22_locale/locale/cons/unicode.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/insert5_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/deque/debug/shrink_to_fit.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/60499.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after2_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after3_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after4_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after5_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after6_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after7_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after8_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/erase_after9_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/insert_after1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/insert_after2_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/insert_after3_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/insert_after4_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after2_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after3_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after4_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after5_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after6_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/splice_after7_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/assign3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert5_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/list/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/60499.cc: Likewise.
	* testsuite/23_containers/map/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/map/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/60499.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/60499.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/60499.cc: Likewise.
	* testsuite/23_containers/set/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/set/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/60499.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/begin1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/begin2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/cbegin_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/cend_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/end1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/end2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_compare_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/invalid_local_iterator_range_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/max_load_factor_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/use_erased_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/use_invalid_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_map/debug/use_invalid_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/60499.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct1_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/construct3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_compare_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/invalid_local_iterator_range_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/max_load_factor_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/use_erased_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/use_invalid_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/use_invalid_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/60499.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/cend_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct1_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct2_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/construct3_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/end1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/end2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_compare_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/invalid_local_iterator_range_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/max_load_factor_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/use_erased_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/use_invalid_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/use_invalid_local_iterator_neg.cc:
	Likewise.
	*  testsuite/23_containers/unordered_set/debug/60499.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/begin1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/begin2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/cbegin_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/cend_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/construct3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/end1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/end2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/insert1_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/insert2_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/insert3_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_compare_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/invalid_local_iterator_range_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/max_load_factor_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/use_erased_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/use_invalid_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/use_invalid_local_iterator_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/debug/52433.cc: Likewise.
	* testsuite/23_containers/vector/debug/60499.cc: Likewise.
	* testsuite/23_containers/vector/debug/bool/shrink_to_fit.cc: Likewise.
	* testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/shrink_to_fit.cc: Likewise.
	* testsuite/25_algorithms/pop_heap/complexity.cc: Likewise.
	* testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
	* testsuite/25_algorithms/sort_heap/complexity.cc: Likewise.
	* testsuite/29_atomics/atomic/60658.cc: Likewise.
	* testsuite/29_atomics/atomic/60695.cc: Likewise.
	* testsuite/29_atomics/atomic/62259.cc: Likewise.
	* testsuite/29_atomics/atomic/64658.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/49445.cc: Likewise.
	* testsuite/29_atomics/atomic/operators/51811.cc: Likewise.
	* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc: Likewise.

From-SVN: r240090
2016-09-12 09:03:50 +00:00
Jonathan Wakely
2501129262 Fix bootstrap failure when ATOMIC_INT_LOCK_FREE < 2
* libsupc++/new_opant.cc: Include exception_defines.h.
	* libsupc++/new_opvant.cc: Likewise.

From-SVN: r240080
2016-09-11 11:19:30 +01:00
Jason Merrill
af63ba4b30 Implement P0035R4, C++17 new of over-aligned types.
gcc/cp/
	* cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE.
	(align_type_node): New macro.
	* call.c (build_operator_new_call): Handle C++17 aligned new.
	(second_parm_is_size_t, build_op_delete_call): Likewise.
	(non_placement_deallocation_fn_p): Likewise. Rename to
	usual_deallocation_fn_p.
	(aligned_allocation_fn_p, aligned_deallocation_fn_p): New.
	* decl.c (cxx_init_decl_processing): Add aligned new support.
	* init.c (type_has_new_extended_alignment): New.
	(build_new_1): Handle aligned new.
	* tree.c (vec_copy_and_insert): New.
gcc/c-family/
	* c.opt: Add -faligned-new and -Waligned-new.
	* c-common.c (max_align_t_align): Split out from...
	(cxx_fundamental_alignment_p): ...here.
	* c-common.h: Declare it.
	* c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
libstdc++-v3/
	* libsupc++/new: Declare aligned new/delete operators.
	* config/abi/pre/gnu.ver: Export them.
	* configure.ac: Check for aligned_alloc, posix_memalign, memalign,
	_aligned_malloc.
	* libsupc++/new_opa.cc: New.
	* libsupc++/new_opant.cc: New.
	* libsupc++/new_opva.cc: New.
	* libsupc++/new_opva.cc: New.
	* libsupc++/del_opa.cc: New.
	* libsupc++/del_opant.cc: New.
	* libsupc++/del_opsa.cc: New.
	* libsupc++/del_opva.cc: New.
	* libsupc++/del_opvant.cc: New.
	* libsupc++/del_opvsa.cc: New.
	* libsupc++/Makefile.am: Build them.

From-SVN: r240056
2016-09-09 17:22:15 -04:00
Tim Shen
f75d599982 variant: include bits/move.h for std::addressof.
2016-09-05  Tim Shen  <timshen@google.com>

	* include/std/variant: include bits/move.h for std::addressof.

From-SVN: r240001
2016-09-05 19:52:11 +00:00
Mikhail Strelnikov
eddca7bd73 variant (_Variant_storage::_M_storage()): Use std::addressof instead of operator& to take address.
2016-09-05  Mikhail Strelnikov  <mikhail.strelnikov@gmail.com>

	* include/std/variant (_Variant_storage::_M_storage()): Use std::addressof
	instead of operator& to take address.

From-SVN: r239996
2016-09-05 19:40:44 +00:00
Maxim Kuvyrkov
5a81036247 Use setrlimit for testing libstdc++ in cross toolchains
* acinclude.m4 (GLIBCXX_CONFIGURE_TESTSUITE): Check for presence of
	setrlimit on both native and cross targets.
	* configure: Regenerate.

From-SVN: r239955
2016-09-02 13:42:55 +00:00
Jonathan Wakely
7663cae227 Constrain std::shared_ptr assignment and resetting
* include/bits/shared_ptr.h (_Assignable): New alias template.
	(shared_ptr::operator=(const shared_ptr<_Tp1>&))
	(shared_ptr::operator=(shared_ptr<_Tp1>&&))
	(shared_ptr::operator=(unique_ptr<_Tp1>&&)): Constrain with
	_Assignable.
	* include/bits/shared_ptr_base.h (_Assignable): New alias template.
	(__shared_ptr::operator=(const __shared_ptr<_Tp1>&))
	(__shared_ptr::operator=(__shared_ptr<_Tp1>&&))
	(__shared_ptr::operator=(unique_ptr<_Tp1>&&)): Constrain with
	_Assignable.
	(__shared_ptr::reset(_Tp1*), __shared_ptr::reset(_Tp1*, _Deleter))
	(__shared_ptr::reset(_Tp1*, _Deleter, _Alloc)): Constrain with
	_Convertible.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Change dg-error to
	match on any line.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/sfinae.cc: New test.
	* testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Update
	expected errors. Remove unnecessary code.
	* testsuite/20_util/shared_ptr/modifiers/reset_sfinae.cc: New test.

From-SVN: r239898
2016-08-31 17:57:20 +01:00
Jonathan Wakely
e46d22a821 Move comparison object in map/set move assignment
* include/bits/stl_tree.h (_Rb_tree::operator=(_Rb_tree&&)): Move
	comparison object.
	* testsuite/23_containers/set/move_comparison.cc: New test.

From-SVN: r239897
2016-08-31 17:57:14 +01:00
Jonathan Wakely
3625264fb3 Add test accidentally not added in revision r239121
* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
	New test.

From-SVN: r239896
2016-08-31 17:57:09 +01:00
Ville Voutilainen
7875b41f1d re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple)
PR libstdc++/77395
	* include/std/type_traits (is_constructible): Forward-declare...
	(__is_base_to_derived_ref): ...and use here.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/is_constructible/77395.cc: New.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/tuple/77395.cc: New.

From-SVN: r239870
2016-08-30 21:46:11 +03:00
Uros Bizjak
e1becf59f9 2.cc: Move dg-do run directive above dg-require-namedlocale directive.
* testsuite/22_locale/time_get/get/char/2.cc: Move dg-do run
	directive above dg-require-namedlocale directive.
	* testsuite/22_locale/time_get/get/wchar_t/2.cc: Ditto.
	* testsuite/27_io/manipulators/extended/get_time/char/2.cc: Ditto.
	* testsuite/27_io/manipulators/extended/get_time/wchar_t/2.cc: Ditto.
	* testsuite/27_io/manipulators/extended/put_time/char/2.cc: Ditto.
	* testsuite/27_io/manipulators/extended/put_time/wchar_t/2.cc: Ditto.

From-SVN: r239867
2016-08-30 18:59:39 +02:00
Tim Shen
4aebb4e4a6 re PR libstdc++/77356 (regex error for a ECMAScript syntax string)
PR libstdc++/77356
	* include/bits/regex_compiler.tcc(_M_insert_bracket_matcher,
	_M_expression_term): Modify to support dash literal.
	* include/bits/regex_scanner.h: Add dash as a token type to make
	a different from the mandated dash literal by escaping.
	* include/bits/regex_scanner.tcc(_M_scan_in_bracket): Emit dash
	token in bracket expression parsing.
	* testsuite/28_regex/regression.cc: Add new testcases.

From-SVN: r239794
2016-08-27 02:03:23 +00:00
Jonathan Wakely
10491e4c04 libstdc++/51960 move-construction for raw_storage_iterator
PR libstdc++/51960
	* doc/xml/manual/intro.xml: Document DR 2127 change.
	* doc/html/*: Regenerate.
	* include/bits/stl_raw_storage_iter.h (operator=(_Tp&&)): Add.
	(operator++(), operator++(int)): Use injected class name.
	* testsuite/20_util/raw_storage_iterator/dr2127.cc: New test.

From-SVN: r239781
2016-08-26 14:11:29 +01:00
Jonathan Wakely
52066eae5d Use effective-target instead of -std options
* testsuite/*: Use { target c++11 } or { target c++14 } instead of
	using -std in dg-options.

From-SVN: r239777
2016-08-26 12:41:37 +01:00
Jonathan Wakely
e8223484b3 Restore dg-interpreter-batch-mode for libstdc++ tests
2016-08-26  Jonathan Wakely  <jwakely@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	* testsuite/lib/gdb-test.exp (gdb-dg-runtest): Define wrapper to save
	and restore dg-interpreter-batch-mode.
	* testsuite/libstdc++-prettyprinters/prettyprinters.exp: Use
	gdb-dg-runtest instead of dg-runtest.
	* testsuite/libstdc++-xmethods/xmethods.exp: Likewise.

Co-Authored-By: Pedro Alves <palves@redhat.com>

From-SVN: r239776
2016-08-26 12:35:58 +01:00
Jonathan Wakely
86bbf15b6b Add new std::basic_string constructor (LWG 2583)
* config/abi/pre/gnu.ver (GLIBCXX_3.4, GLIBCXX_3.4.21): Use more
	precise patterns for basic_string constructors.
	(GLIBCXX_3.4.23): Export new constructors.
	* doc/xml/manual/intro.xml: Document LWG 2583 status.
	* doc/html/*: Regenerate.
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string(const basic_string&, size_type, const Alloc&)): Add
	new constructor for LWG 2583.
	(basic_string(const basic_string&, size_type, size_type)): Remove
	default argument.
	[!_GLIBCXX_USE_CXX11_ABI]: Likewise.
	* include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]: Define it.
	* testsuite/21_strings/basic_string/cons/char/8.cc: New test.
	* testsuite/21_strings/basic_string/cons/wchar_t/8.cc: New test.

From-SVN: r239773
2016-08-26 11:41:37 +01:00
Aditya Kumar
9a38acdfdc Remove trailing whitespace in C++ headers
2016-08-24  Aditya Kumar  <hiraditya@msn.com>

	* include/bits/algorithmfwd.h: Remove trailing whitespace.
	* include/bits/shared_ptr_base.h: Likewise.

From-SVN: r239731
2016-08-24 09:03:01 +01:00
Jonathan Wakely
e90a801017 Add C++17 constexpr to debug and profile mode arrays
* include/debug/array (array): Add _GLIBCXX17_CONSTEXPR.
	* include/profile/array (array): Likewise.
	(array::swap): Fix exception specification for zero-sized arrays.

From-SVN: r239705
2016-08-23 16:54:57 +01:00
Jonathan Wakely
5ea387db6c libstdc++/77334 move assign RB trees of non-copyable types
PR libstdc++/77334
	* include/bits/stl_tree.h (_Rb_tree::_M_move_assign): New functions.
	(_Rb_tree::operator=(_Rb_tree&&)): Dispatch to _M_move_assign.
	* testsuite/23_containers/map/77334.cc: New test.

From-SVN: r239698
2016-08-23 14:15:12 +01:00
Jonathan Wakely
5d1c6b3e76 Remove reference to -pthreads option in libstdc++ manual
* doc/xml/manual/using.xml: Remove reference to -pthreads option.
	* doc/html/*: Regenerate.

From-SVN: r239693
2016-08-23 11:13:36 +01:00
Jonathan Wakely
457c4a3fd2 Use dg-do preprocess instead of compile for tests
* testsuite/experimental/feat-cxx14.cc: Only preprocess, not compile.
	* testsuite/experimental/feat-lib-fund.cc: Likewise.

From-SVN: r239692
2016-08-23 11:13:31 +01:00
Jonathan Wakely
b405d54fcd Implement resolution of LWG DR 685 precisely
PR libstdc++/71771
	* include/bits/stl_iterator.h
	(operator-(reverse_iterator<Iter>, reverse_iterator<Iter>): Only
	define for C++98 mode.
	(operator-(move_iterator<Iter>, move_iterator<Iter>): Don't define.
	* testsuite/24_iterators/headers/iterator/synopsis.cc: Use
	-std=gnu++98.
	* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc: New test.
	* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc: New test.
	* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: New test.
	* testsuite/24_iterators/move_iterator/greedy_ops.cc: Don't test
	difference operator.
	* testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Only test
	difference operator for C++98.
	* testsuite/24_iterators/reverse_iterator/71771.cc: New test.

From-SVN: r239691
2016-08-23 11:13:26 +01:00
Jonathan Wakely
06db992005 Add constexpr to <iterator> and <array> for C++17
* include/bits/c++config (_GLIBCXX17_CONSTEXPR): Define.
	* include/bits/range_access.h (begin, end, rbegin, rend, crbegin)
	(crend): Add _GLIBCXX17_CONSTEXPR as per P0031R0.
	* include/bits/stl_iterator.h (reverse_iterator, move_iterator)
	(__make_reverse_iterator, make_reverse_iterator, make_move_iterator):
	Likewise.
	* include/bits/stl_iterator_base_funcs.h (__distance, __advance): Add
	_GLIBCXX14_CONSTEXPR.
	(distance, advance, next, prev): Add _GLIBCXX17_CONSTEXPR.
	* include/std/array (array::begin, array::end, array::rbegin)
	(array::rend, array::cbegin, array:cend, array::crbegin)
	(array::crend, array::operator[], array::at, array::front)
	(array::back, array::data): Likewise.
	* testsuite/24_iterators/headers/iterator/range_access.cc: Replace
	with separate tests for C++11, C++14, and C++17.
	* testsuite/24_iterators/headers/iterator/range_access_c++11.cc: New.
	* testsuite/24_iterators/headers/iterator/range_access_c++14.cc: New.
	* testsuite/24_iterators/headers/iterator/range_access_c++17.cc: New.

From-SVN: r239690
2016-08-23 11:13:12 +01:00
Tim Shen
d79d625275 Split _M_dfs() into smaller functions.
* regex_executor.h(_M_handle_repeat, _M_handle_subexpr_begin)
	(_M_handle_subexpr_end, _M_handle_line_begin_assertion)
	(_M_handle_line_end_assertion, _M_handle_word_boundary)
	(_M_handle_subexpr_lookahead, _M_handle_match)
	(_M_handle_backref, _M_handle_accept, _M_handle_alternative):
	Add separate function declarations.
	* regex_executor.tcc: Split _M_dfs() into multiple handler functions.

From-SVN: r239673
2016-08-22 19:50:15 +00:00
Gleb Natapov
27abac2648 libstdc++/68297 avoid throw/catch in make_exception_ptr
2016-08-22  Gleb Natapov  <gleb@scylladb.com>

	PR libstdc++/68297
	* config/abi/pre/gnu-versioned-namespace.ver: Export
	__cxa_init_primary_exception and std::exception_ptr(void*).
	* config/abi/pre/gnu.ver (CXXABI_1.3.11) : Add new symbol version and
	export __cxa_init_primary_exception and std::exception_ptr(void*).
	* include/Makefile.am: Add new headers.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Add new headers.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/cxxabi.h (__cxa_allocate_exception): Move to ...
	* libsupc++/cxxabi_init_exception.h: New header.
	(__cxa_init_primary_exception): Declare.
	* libsupc++/eh_throw.cc (__cxa_init_primary_exception): Define.
	(__cxa_throw): Use __cxa_init_primary_exception.
	* libsupc++/exception (std::exception): Move to ...
	* libsupc++/exception.h: New header.
	* libsupc++/exception_ptr.h (__exception_ptr::exception_ptr): Add
	friend declaration.
	(__exception_ptr::__dest_thunk): New function template.
	(std::make_exception_ptr) [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]:
	Use __cxa_allocate_exception and __cxa_init_primary_exception to
	create exception_ptr.
	* libsupc++/typeinfo: Include bits/exception.h instead of exception.
	* testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.11 version.

From-SVN: r239664
2016-08-22 18:29:31 +01:00
Jonathan Wakely
4c86ffccf9 Update links to libstdc++ Doxygen pages
* doc/xml/api.xml: Replace hardcoded links for specific versions with
	link to docs for all releases.
	* doc/html/*: Regenerate.

From-SVN: r239663
2016-08-22 17:47:39 +01:00
Jonathan Wakely
94f54d47ca Add noexcept to std::function swap
PR libstdc++/77322
	* doc/xml/manual/intro.xml: Document DR 2062 change.
	* include/std/functional (function::swap): Add noexcept.
	(swap(function<Res(Args...)&, function<Res(Args...)&)): Likewise.
	* testsuite/20_util/function/77322.cc: New test.

From-SVN: r239662
2016-08-22 17:47:34 +01:00
Jonathan Wakely
71c54f8ea2 Simplify dg-options for tests using pthreads
* testsuite/21_strings/basic_string/pthread18185.cc: Use -pthread for
	*-*-solaris* instead of -pthreads.
	* testsuite/21_strings/basic_string/pthread4.cc : Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-1.cc: Likewise.
	* testsuite/22_locale/locale/cons/12658_thread-2.cc: Likewise.
	* testsuite/23_containers/list/pthread1.cc: Likewise.
	* testsuite/23_containers/list/pthread5.cc: Likewise.
	* testsuite/23_containers/map/pthread6.cc: Likewise.
	* testsuite/27_io/basic_ofstream/pthread2.cc: Likewise.
	* testsuite/27_io/basic_ostringstream/pthread3.cc: Likewise.
	* testsuite/30_threads/shared_mutex/*: Likewise.
	* testsuite/ext/rope/pthread7-rope.cc: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/
	default_weaktoshared.cc: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/thread/
	mutex_weaktoshared.cc: Likewise.
	* testsuite/20_util/shared_ptr/atomic/3.cc: Likewise. Use
	dg-require-effective-target instead of using -std option.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc:
	Likewise.
	* testsuite/30_threads/async/*: Likewise.
	* testsuite/30_threads/call_once/*: Likewise.
	* testsuite/30_threads/condition_variable/*: Likewise.
	* testsuite/30_threads/condition_variable_any/*: Likewise.
	* testsuite/30_threads/future/*: Likewise.
	* testsuite/30_threads/lock/*: Likewise.
	* testsuite/30_threads/mutex/*: Likewise.
	* testsuite/30_threads/packaged_task/*: Likewise.
	* testsuite/30_threads/promise/*: Likewise.
	* testsuite/30_threads/recursive_mutex/*: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/*: Likewise.
	* testsuite/30_threads/shared_future/*: Likewise.
	* testsuite/30_threads/shared_lock/*: Likewise.
	* testsuite/30_threads/shared_timed_mutex/*: Likewise.
	* testsuite/30_threads/this_thread/*: Likewise.
	* testsuite/30_threads/thread/*: Likewise.
	* testsuite/30_threads/timed_mutex/*: Likewise.
	* testsuite/30_threads/try_lock/*: Likewise.
	* testsuite/30_threads/unique_lock/*: Likewise.

From-SVN: r239624
2016-08-19 17:36:07 +01:00
Jonathan Wakely
e6ee5bfd68 Define std::not_fn for C++17
* doc/xml/manual/status_cxx2017.xml: Update status of not_fn.
	* doc/html/*: Regenerate.
	* include/experimental/functional (_Not_fn, not_fn): Match C++17
	semantics.
	* include/std/functional (_Not_fn, not_fn): Define for C++17.
	* testsuite/20_util/not_fn/1.cc: New.
	* testsuite/experimental/functional/not_fn.cc: Test abstract class.
	Remove test for volatile-qualified wrapper.

From-SVN: r239623
2016-08-19 16:42:34 +01:00
Jonathan Wakely
387edf83a0 Define std::atomic<T>::is_always_lock_free for C++17
* include/std/atomic (atomic::is_always_lock_free): Define.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
	* testsuite/29_atomics/atomic/is_always_lock_free.cc: New.
	* testsuite/29_atomics/atomic_integral/is_always_lock_free.cc: New.
	* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/*: Regenerate.

From-SVN: r239622
2016-08-19 16:42:27 +01:00
Jonathan Wakely
285ee2fb11 Fix ambiguities in C++17 mode
* include/experimental/tuple (apply): Qualify call to __apply_impl.
	* include/std/tuple (apply): Likewise.
	* testsuite/experimental/system_error/value.cc: Fix ambiguities in
	C++17 mode.
	* testsuite/experimental/tuple/tuple_size.cc: Likewise.
	* testsuite/experimental/type_traits/value.cc: Likewise.

From-SVN: r239621
2016-08-19 16:42:11 +01:00
Jonathan Wakely
1f4ed04ed8 Update C++17 library status table
* doc/xml/manual/status_cxx2017.xml: Update status of make_from_tuple
	and variant.
	* doc/html/*: Regenerate.

From-SVN: r239608
2016-08-19 09:16:13 +01:00
Ville Voutilainen
a577f786b6 Implement the latest proposed resolution of LWG 2756.
* include/std/optional (Optional_base(const _Tp&))
	(Optional_base(_Tp&&), using _Base::_Base): Remove.
	(optional(nullopt_t)): New.
	(optional(_Up&&)): Invoke base directly with in_place
	rather than creating a temporary, add default template
	argument, change constraints.
	(optional(const optional<_Up>&)): Invoke base directly
	with in_place, remove unnecessary constraints.
	(optional(optional<_Up>&& __t)): Likewise.
	(optional(in_place_t, _Args&&...)): New.
	(optional(in_place_t, initializer_list<_Up>, _Args&&...)): Likewise.
	(operator=(_Up&&)): Add default template argument, change constraints.
	(operator=(const optional<_Up>&)): Put is_same first in the
	constraints.
	(operator=(optional<_Up>&&)): Likewise.
	* testsuite/20_util/optional/assignment/5.cc: Add a test to
	verify assignment from something that can't be perfect-forwarded.
	* testsuite/20_util/optional/cons/value.cc: Add tests to verify
	that a nested optional is disengaged when constructed
	from a disengaged element type,	and to verify that assignments
	from an engaged element type engage the optional.

From-SVN: r239593
2016-08-18 23:33:57 +03:00
Tim Shen
197c757cb1 Implement <variant>
* include/Makefile.am: Add new file std/variant.
	* include/Makefile.in: Generated from Makefile.am.
	* include/bits/enable_special_members.h: Add a tag type to allow
	the construction in non-default constructor.
	* include/bits/uses_allocator.h: Add convenience traits to
	detect constructibility.
	* include/std/variant: Implement <variant>.
	* testsuite/20_util/variant/compile.cc: Compile-time tests.
	* testsuite/20_util/variant/run.cc: Runtime tests.

From-SVN: r239590
2016-08-18 20:31:26 +00:00
Jonathan Wakely
0b224dcf60 Expand libstdc++ docs on testing
* doc/xml/manual/test.xml (test.run.permutations): Expand section.
	(test.new_tests): Rewrite section.
	(tests.dg.directives): New section.
	* doc/html/*: Regenerate.

From-SVN: r239574
2016-08-18 14:47:42 +01:00
Jonathan Wakely
b56d48ef86 Improve documentation of libstdc++ test targets
* doc/xml/manual/test.xml: Improve documentation of test targets.
	Document new-abi-baseline, check-debug, and check-parallel targets.

From-SVN: r239573
2016-08-18 14:47:37 +01:00
Jonathan Wakely
409d55557b Document libstdc++.so versioning in manual
* doc/xml/manual/build_hacking.xml: New section on shared library
	versioning.

From-SVN: r239572
2016-08-18 14:47:33 +01:00
Jonathan Wakely
a8107a983f Improve markup in libstdc++ manual
* doc/xml/manual/build_hacking.xml: Improve markup.
	* doc/xml/manual/test.xml: Likewise. Change section title from "Test"
	to "Testing".
	* doc/xml/faq.xml: Change link text to "Testing".

From-SVN: r239571
2016-08-18 14:47:28 +01:00
Jonathan Wakely
6cb9849199 Remove unintended dg-options directive
* testsuite/tr1/3_function_objects/function/10.cc: Remove unintended
	dg-options directive.

From-SVN: r239564
2016-08-18 10:58:28 +01:00
Jonathan Wakely
6fbf26cc57 Fix invalid dg-do directive
* testsuite/20_util/reference_wrapper/invoke-2.cc: Fix invalid dg-do
	directive and use effective target instead of dg-options.

From-SVN: r239548
2016-08-17 20:58:44 +01:00
Jonathan Wakely
18a20f3f25 Use effective target instead of -std in dg-options
* testsuite/20_util/hash/chi2_q_bit_flip_set.cc: Use effective target
	instead of -std in dg-options.
	* testsuite/20_util/hash/chi2_q_bit_string_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_numeric_pattern_set.cc: Likewise.
	* testsuite/20_util/hash/chi2_q_uniform_random.cc: Likewise.
	* testsuite/20_util/hash/quality.cc: Likewise.
	* testsuite/25_algorithms/heap/moveable.cc: Likewise.
	* testsuite/25_algorithms/heap/moveable2.cc: Likewise.
	* testsuite/25_algorithms/nth_element/random_test.cc: Likewise.
	* testsuite/25_algorithms/partial_sort/random_test.cc: Likewise.
	* testsuite/25_algorithms/partial_sort_copy/random_test.cc: Likewise.
	* testsuite/25_algorithms/sort/random_test.cc: Likewise.

From-SVN: r239547
2016-08-17 20:43:13 +01:00
Jonathan Wakely
f771720378 Add c++11 effective target to tests for C++11 features
* testsuite/20_util/tuple/67844.cc: Require c++11 effective target.
	* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Likewise.
	* testsuite/27_io/rvalue_streams.cc: Likewise.

From-SVN: r239545
2016-08-17 20:23:15 +01:00
Jonathan Wakely
e30c6e0c14 Add comment explaining why -std=c++14 is needed.
* testsuite/26_numerics/complex/literals/types.cc: Add comment.

From-SVN: r239543
2016-08-17 17:09:15 +01:00
Jonathan Wakely
e07f4b008d Remove duplicate dg-options directive
* testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
	Remove duplicate dg-options directive.

From-SVN: r239538
2016-08-17 15:11:20 +01:00
Jonathan Wakely
37144e84aa Adjust DG directives in libstdc++ Profile Mode test
* testsuite/ext/profile/all.cc: Use effective target instead of
	-std=gnu++11. Use dg-additional-options instead of repeating options.

From-SVN: r239536
2016-08-17 14:39:14 +01:00
Jonathan Wakely
8fe79e7334 Adjust DG directives in libstdc++ XFAIL test
* testsuite/20_util/bind/ref_neg.cc: Use effective target instead of
	-std=gnu++11. Add -fno-show-columns to dg-options. Use dg-prune-output
	instead of dg-excess-errors.

From-SVN: r239535
2016-08-17 14:39:10 +01:00
Jonathan Wakely
c42966921a Adjust testcases for C++17 compatibility
* testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc: Disable
	test for C++17.
	* testsuite/experimental/chrono/value.cc: Avoid ambiguities in C++17.
	* testsuite/experimental/ratio/value.cc: Likewise.
	* testsuite/ext/pb_ds/regression/hash_map_rand.cc: Disable test for
	C++17.
	* testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
	* testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	10_cyl_bessel_k/airy.cc: Adjust namespace of __detail::__airy for
	C++17 compatibility.

From-SVN: r239534
2016-08-17 14:39:05 +01:00
Jonathan Wakely
ba364478df Adjust testcase for C++14 compatibility
* testsuite/24_iterators/headers/iterator/range_access.cc: Adjust
	expected signatures for C++14 compatibility.

From-SVN: r239533
2016-08-17 14:38:58 +01:00
Jonathan Wakely
657213f736 PR 77264 constrain new std::basic_string overloads
PR libstdc++/77264
	* include/bits/basic_string.h (operator=(__sv_type)
	(append(__sv_type), assign(__sv_type), insert(size_type, __sv_type))
	(replace(size_type, size_type, __sv_type))
	(replace(const_iterator, const_iterator, __sv_type))
	(find(__sv_type, size_type), rfind(__sv_type, size_type))
	(compare(size_type, size_type, __sv_type)): Reformat.
	(_If_sv): Define helper for SFINAE constaints.
	(append(const _Tp&, size_type, size_type))
	(assign(const _Tp&, size_type, size_type))
	(insert(size_type, const _Tp&, size_type, size_type))
	(replace(size_type, size_type, const _Tp&, size_type, size_type)):
	Use _If_sv.
	* testsuite/21_strings/basic_string/modifiers/append/char/4.cc: Test
	SFINAE constraints.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
	Likewise.

From-SVN: r239532
2016-08-17 14:38:52 +01:00
Jonathan Wakely
32917686b0 PR 72847 Prevent double-free in std::vector<bool>
PR libstdc++/72847
	* include/bits/stl_bvector.h (_Bvector_base::_M_deallocate): Zero
	pointers to start and end of storage.
	* testsuite/23_containers/vector/bool/72847.cc: New test.
	* include/bits/vector.tcc (vector<bool>::_M_reallocate): Only update
	_M_finish after deallocating.
	(vector<bool>::_M_fill_insert): Likewise.
	(vector<bool>::_M_insert_range): Likewise.
	(vector<bool>::_M_insert_aux): Likewise.

From-SVN: r239497
2016-08-16 12:33:16 +01:00
Ville Voutilainen
5c578ae434 Implement LWG 2744 and LWG 2754.
* include/std/any (any(ValueType&&)): Constrain with __is_in_place_type.
	(any(in_place_type_t<_ValueType>, _Args&&...)): Use _Decay.
	(any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...)):
	Likewise.
	(emplace(_Args&&...)): Likewise.
	(emplace(initializer_list<_Up>, _Args&&...)): Likewise.
	* include/std/utility: (__is_in_place_type_impl): New.
	(__is_in_place_type): Likewise.
	* testsuite/20_util/any/assign/emplace.cc: Add tests for decaying
	emplace.
	* testsuite/20_util/any/cons/in_place.cc: Add tests for decaying
	in_place constructor.
	* testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.
	* testsuite/20_util/any/requirements.cc: Add a test for
	in_place-constructing a non-default-constructible type.

From-SVN: r239482
2016-08-15 18:06:09 +03:00
Ville Voutilainen
24299f6544 Add a feature macro for C++17 make_from_tuple.
* include/std/tuple (__cpp_lib_make_from_tuple): New.
	* testsuite/20_util/tuple/make_from_tuple/1.cc: Adjust.

From-SVN: r239480
2016-08-15 15:46:47 +03:00
Uros Bizjak
0657379e3b ops.cc: Always include ostream and ext/stdio_filebuf.h.
* src/filesystem/ops.cc: Always include ostream and
	ext/stdio_filebuf.h.
	(do_copy_file): Check if _GLIBCXX_USE_FCHMODAT is defined.
	[_GLIBCXX_USE_SENDFILE]: Fallback to read/write operations in case
	sendfile fails with ENOSYS or EINVAL.

From-SVN: r239479
2016-08-15 13:40:37 +02:00
Thomas Preud'homme
f9657322cf re PR testsuite/72840 (PASS->NA: 20_util/ratio/cons/cons_overflow_neg.cc)
2016-08-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    PR libstdc++/72840
    * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Fix dg-error
    syntax.

From-SVN: r239463
2016-08-15 09:14:15 +00:00
Ville Voutilainen
ca1ab6be3b Implement C++17 make_from_tuple.
* include/std/tuple (__make_from_tuple_impl, make_from_tuple): New.
	* testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.

From-SVN: r239372
2016-08-11 17:51:47 +03:00
Ville Voutilainen
68a51b68bd Implement LWG 2758.
* include/bits/basic_string.h
	(append(__sv_type, size_type, size_type)): Turn into a template,
	change parameter type, constrain, add a conversion to __sv_type
	from the dependent parameter type.
	(assign(__sv_type, size_type, size_type)): Likewise.
	(insert(size_type, __sv_type, size_type, size_type)): Likewise.
	(replace(size_type, size_type, __sv_type, size_type, size_type)):
	Likewise.
	(compare(size_type, size_type,__sv_type, size_type, size_type)):
	Likewise.
	* testsuite/21_strings/basic_string/lwg2758.cc: New.

From-SVN: r239370
2016-08-11 17:45:23 +03:00
Jonathan Wakely
caee9cdee7 Update C++17 library status table
* doc/xml/manual/status_cxx2017.xml: Update status table.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r239209
2016-08-06 13:45:58 +01:00
Jonathan Wakely
ea2f1f4947 * testsuite/lib/libstdc++.exp: Fix typo in comment.
From-SVN: r239193
2016-08-06 11:44:17 +01:00
Jonathan Wakely
6ef835c6c0 Use ::new to avoid finding overloaded operator new
PR libstdc++/72820
	* include/std/functional (_Function_base::_Base_manager::_M_clone):
	Qualify new operator.
	* testsuite/20_util/function/cons/72820.cc: New test.

From-SVN: r239191
2016-08-06 11:21:07 +01:00
Jonathan Wakely
3e9f67e6a2 Add std::apply for C++17
* doc/xml/manual/status_cxx2017.xml: Add missing LFTSv2 features.
	* doc/html/manual/status.html: Regenerate.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/invoke.h: New header.
	(__invoke): Make constexpr. Add && to types in exception specification.
	* include/experimental/tuple (apply, __apply_impl): Fix non-reserved
	names. Include <bits/invoke.h> and use std::__invoke.
	* include/std/functional (__invfwd, __invoke_impl, __invoke): Move to
	new header.
	(invoke): Add && to types in exception specification.
	* include/std/tuple (apply, __apply_impl): Define for C++17.
	* testsuite/20_util/tuple/apply/1.cc: New test.
	* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust dg-error
	lineno.

From-SVN: r239183
2016-08-06 01:06:02 +01:00
Jonathan Wakely
a0b1bf2181 Correct status of __cpp_lib_enable_shared_from_this
* doc/xml/manual/status_cxx2017.xml: Correct shared_from_this status.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r239171
2016-08-05 14:57:30 +01:00
Jonathan Wakely
5f6acdfb0b Implement C++17 rounding functions for std::chrono (P0092R1)
* include/std/chrono (floor, ceil, round, abs): New for C++17.
	* testsuite/20_util/duration_cast/rounding.cc: New test.
	* testsuite/20_util/time_point_cast/rounding.cc: New test.
	* doc/xml/manual/status_cxx2017.xml: Update status table.
	* doc/html/manual/status.html: Regenerate.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	dg-error lineno.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
	* testsuite/20_util/duration/literals/range.cc: Likewise.

From-SVN: r239170
2016-08-05 14:52:59 +01:00
Jonathan Wakely
98e6e66233 Use __invoke in std::function internals
* include/std/functional (__callable_functor): Remove.
	(_Function_handler::_M_invoke): Use __invoke instead of
	__callable_functor or mem_fn.
	(function::_Callable): Use lvalue in result_of expression.
	(function): Remove TODO comments about allocators.
	* testsuite/20_util/function/cons/refqual.cc: New test.

From-SVN: r239166
2016-08-05 10:00:34 +01:00
Jonathan Wakely
42183d034d Define std::is_callable and std::is_nothrow_callable
* doc/xml/manual/status_cxx2017.xml: Update status table.
	* include/std/functional (__inv_unwrap): Move to <type_traits>.
	(__invoke_impl): Remove exception specifications.
	(__invoke, invoke): Add exception specifications using
	__is_nothrow_callable.
	* include/std/type_traits (__inv_unwrap): Move from <functional>.
	(__is_callable_impl, __call_is_nt, __call_is_nothrow): New helpers.
	(__is_callable, __is_nothrow_callable): New traits.
	(is_callable, is_callable_v): New C++17 traits.
	(is_nothrow_callable, is_nothrow_callable_v): Likewise.
	* testsuite/20_util/is_callable/requirements/
	explicit_instantiation.cc: New test.
	* testsuite/20_util/is_callable/requirements/
	explicit_instantiation_ext.cc: New test.
	* testsuite/20_util/is_callable/requirements/typedefs.cc: New test.
	* testsuite/20_util/is_callable/requirements/typedefs_ext.cc: New
	test.
	* testsuite/20_util/is_callable/value.cc: New test.
	* testsuite/20_util/is_callable/value_ext.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/
	explicit_instantiation.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/
	explicit_instantiation_ext.cc: New test.
	* testsuite/20_util/is_nothrow_callable/requirements/typedefs.cc:
	New test.
	* testsuite/20_util/is_nothrow_callable/requirements/typedefs_ext.cc:
	New test.
	* testsuite/20_util/is_nothrow_callable/value.cc: New test.
	* testsuite/20_util/is_nothrow_callable/value_ext.cc: New test.

From-SVN: r239145
2016-08-04 19:02:56 +01:00
Jonathan Wakely
246c618e71 Update C++17 library implementation status table
* doc/xml/manual/status_cxx2017.xml: Update C++17 status table.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r239124
2016-08-04 14:33:02 +01:00
Jonathan Wakely
9a8e528cf1 Define std::enable_shared_from_this::weak_from_this
* testsuite/20_util/enable_shared_from_this/members/reinit.cc: Use
	effective target not dg-options. Move check for feature-test macro to:
	* testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
	New test.

From-SVN: r239121
2016-08-04 13:33:10 +01:00
Jonathan Wakely
7d2035fafe Simplify std::__invoke_impl definitions
* include/std/functional (_Unwrap): Rename to __inv_unwrap.
	(__invfwd): Adjust.
	(__invoke_impl): Remove unused template parameters.
	* testsuite/20_util/function_objects/invoke/59768.cc: Remove unused
	parameter.
	* testsuite/20_util/function_objects/invoke/ref_ext.cc: Copy 59768.cc
	and test __invoke extension for C++11.

From-SVN: r239120
2016-08-04 12:09:29 +01:00
Jonathan Wakely
c7fdbdcdbd Define feature-test macro for std::enable_shared_from_this
* include/bits/shared_ptr_base.h (__cpp_lib_enable_shared_from_this):
	Define feature-test macro.
	* testsuite/20_util/enable_shared_from_this/members/reinit.cc: Test
	for the macro.

From-SVN: r239094
2016-08-03 20:10:06 +01:00
Jonathan Wakely
f21f4463ad Define std::shared_ptr::weak_type
* include/bits/shared_ptr.h (shared_ptr::weak_type): Define.
	* include/bits/shared_ptr_base.h (__shared_ptr::weak_type): Define.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/requirements/weak_type.cc: New test.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.

From-SVN: r239093
2016-08-03 20:09:57 +01:00
Jonathan Wakely
32eaac9c91 Define std::as_const
* include/std/utility (as_const): Define.
	* testsuite/20_util/as_const/1.cc: New test.
	* testsuite/20_util/as_const/rvalue_neg.cc: New test.

From-SVN: r239090
2016-08-03 19:11:23 +01:00
Jonathan Wakely
b7dabce5f3 Define std::owner_less<void> specialization (P0074R0)
* include/bits/shared_ptr.h (owner_less): Add default template
	argument.
	* include/bits/shared_ptr_base.h (_Sp_owner_less<void, void>): Define
	specialization.
	(owner_less<void>): Define specialization.
	* include/bits/stl_function.h (__cpp_lib_transparent_operators):
	Update value.
	* testsuite/20_util/owner_less/void.cc: New test.
	* testsuite/experimental/feat-cxx14.cc: Update macro value tested.

From-SVN: r239089
2016-08-03 19:11:18 +01:00
Jonathan Wakely
068c8ac17c Define C++17 feature-test macros
* include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
	Define feature-test macro.
	* include/bits/range_access.h (__cpp_lib_array_constexpr): Likewise.
	* include/std/shared_mutex (__cpp_lib_shared_mutex): Uncomment.
	* include/std/type_traits (__cpp_lib_logical_traits): Fix value.
	(__cpp_lib_type_trait_variable_templates): Define.

From-SVN: r239088
2016-08-03 19:11:10 +01:00
Jonathan Wakely
0bd9bdb4db Define __cpp_lib_generic_associative_lookup feature-test macro
* include/bits/stl_function.h: Remove commented-out macro.
	* include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
	Define feature-test macro.
	* testsuite/experimental/feat-cxx14.cc: Add tests for more macros.

From-SVN: r239084
2016-08-03 17:42:31 +01:00
Jonathan Wakely
f8571e5150 Enable Mathematical Special Functions for C++17
* include/bits/c++config (_GLIBCXX_USE_STD_SPEC_FUNCS): Define for
	C++17, or for C++11/C++14 when __STDCPP_WANT_MATH_SPEC_FUNCS__ is
	true.
	* include/bits/specfun.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]: Don't
	do #error for C++17.
	* include/c_global/cmath: Check _GLIBCXX_USE_STD_SPEC_FUNCS instead
	of __STDCPP_WANT_MATH_SPEC_FUNCS__.
	* include/tr1/bessel_function.tcc: Likewise.
	* include/tr1/beta_function.tcc: Likewise.
	* include/tr1/cmath: Likewise.
	* include/tr1/ell_integral.tcc: Likewise.
	* include/tr1/exp_integral.tcc: Likewise.
	* include/tr1/gamma.tcc: Likewise.
	* include/tr1/hypergeometric.tcc: Likewise.
	* include/tr1/legendre_function.tcc: Likewise.
	* include/tr1/modified_bessel_func.tcc: Likewise.
	* include/tr1/poly_hermite.tcc: Likewise.
	* include/tr1/poly_laguerre.tcc: Likewise.
	* include/tr1/riemann_zeta.tcc: Likewise.
	* include/tr1/special_function_util.h: Likewise.
	* testsuite/26_numerics/headers/cmath/functions_std_c++17.cc: New.

From-SVN: r239081
2016-08-03 16:54:13 +01:00
Jonathan Wakely
27631a2542 Remove deprecated has_trivial_xxx traits
* include/std/type_traits (has_trivial_default_constructor): Remove.
	(has_trivial_copy_constructor, has_trivial_copy_assign): Likewise.
	* testsuite/20_util/has_trivial_copy_assign/requirements/
	explicit_instantiation.cc: Remove test.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line number.
	* testsuite/20_util/has_trivial_copy_assign/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/has_trivial_copy_assign/value.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/has_trivial_copy_constructor/value.cc: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/has_trivial_default_constructor/value.cc:
	Likewise.
	* testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
	Check has_trivial_default_constructor, has_trivial_copy_constructor,
	and has_trivial_copy_assign are not defined.
	* testsuite/20_util/pair/requirements/dr801.cc: Remove commented out
	tests.
	* testsuite/20_util/tuple/requirements/dr801.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line number.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.

From-SVN: r239079
2016-08-03 16:18:30 +01:00
Jonathan Wakely
589a30d1a4 Fix std::wstring allocator tests
* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
	Remove reundant check for _GLIBCXX_USE_WCHAR_T and fix char type.
	* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
	Likewise.
	* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
	Likewise.

From-SVN: r238996
2016-08-02 20:34:36 +01:00
Jonathan Wakely
8bcd00bb13 Improve comments on check_v3_target_filesystem_ts
* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Improve
	comments.

From-SVN: r238995
2016-08-02 20:34:30 +01:00
Jonathan Wakely
a4e1011c49 Move dg-error directives to relevant lines
* testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Move
	dg-error to relevant line.
	* testsuite/19_diagnostics/error_condition/operators/bool_neg.cc:
	Likewise.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.

From-SVN: r238994
2016-08-02 20:34:25 +01:00
Jonathan Wakely
64dde68296 Add -fno-show-column to libstdc++ test flags
* scripts/testsuite_flags.in: Add -fno-show-column to cxxflags.

From-SVN: r238993
2016-08-02 20:34:15 +01:00
Jonathan Wakely
807bd0963e Skip C tests if test flags include C++ options
* testsuite/18_support/bad_exception/23591_thread-1.c: Skip test if
	options are present that aren't valid for C.
	* testsuite/abi/header_cxxabi.c: Likewise.

From-SVN: r238988
2016-08-02 14:32:26 +01:00
Jonathan Wakely
8c65cd3054 Test TR1 special functions without adding them to std
* testsuite/tr1/5_numerical_facilities/special_functions/16_hermite/
	check_value.cc: Do not add special functions to namespace std in TR1
	test.

From-SVN: r238987
2016-08-02 14:32:21 +01:00
Jonathan Wakely
196c9e7a7d Only run math special function tests for C++11 and later
* testsuite/ext/special_functions/conf_hyperg/check_nan.cc: Only
	run for C++11 and later.
	* testsuite/ext/special_functions/conf_hyperg/check_value.cc:
	Likewise.
	* testsuite/ext/special_functions/conf_hyperg/compile.cc: Likewise.
	* testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
	* testsuite/ext/special_functions/hyperg/check_value.cc: Likewise.
	* testsuite/ext/special_functions/hyperg/compile.cc: Likewise.
	* testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
	Likewise.
	* testsuite/special_functions/01_assoc_laguerre/check_value.cc:
	Likewise.
	* testsuite/special_functions/01_assoc_laguerre/compile.cc: Likewise.
	* testsuite/special_functions/01_assoc_laguerre/compile_2.cc:
	Likewise.
	* testsuite/special_functions/02_assoc_legendre/check_nan.cc:
	Likewise.
	* testsuite/special_functions/02_assoc_legendre/check_value.cc:
	Likewise.
	* testsuite/special_functions/02_assoc_legendre/compile.cc: Likewise.
	* testsuite/special_functions/02_assoc_legendre/compile_2.cc:
	* testsuite/special_functions/03_beta/check_nan.cc: Likewise.
	* testsuite/special_functions/03_beta/check_value.cc: Likewise.
	* testsuite/special_functions/03_beta/compile.cc: Likewise.
	* testsuite/special_functions/03_beta/compile_2.cc: Likewise.
	* testsuite/special_functions/04_comp_ellint_1/check_nan.cc: Likewise.
	* testsuite/special_functions/04_comp_ellint_1/check_value.cc:
	Likewise.
	* testsuite/special_functions/04_comp_ellint_1/compile.cc: Likewise.
	* testsuite/special_functions/04_comp_ellint_1/compile_2.cc: Likewise.
	* testsuite/special_functions/05_comp_ellint_2/check_nan.cc: Likewise.
	* testsuite/special_functions/05_comp_ellint_2/check_value.cc:
	Likewise.
	* testsuite/special_functions/05_comp_ellint_2/compile.cc: Likewise.
	* testsuite/special_functions/05_comp_ellint_2/compile_2.cc: Likewise.
	* testsuite/special_functions/06_comp_ellint_3/check_nan.cc: Likewise.
	* testsuite/special_functions/06_comp_ellint_3/check_value.cc:
	Likewise.
	* testsuite/special_functions/06_comp_ellint_3/compile.cc: Likewise.
	* testsuite/special_functions/06_comp_ellint_3/compile_2.cc: Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/check_value.cc:
	Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/compile.cc: Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/compile_2.cc: Likewise.
	* testsuite/special_functions/07_cyl_bessel_i/pr56216.cc: Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/check_value.cc:
	Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/compile.cc: Likewise.
	* testsuite/special_functions/08_cyl_bessel_j/compile_2.cc: Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/check_value.cc:
	Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/compile.cc: Likewise.
	* testsuite/special_functions/09_cyl_bessel_k/compile_2.cc: Likewise.
	* testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
	* testsuite/special_functions/10_cyl_neumann/check_value.cc: Likewise.
	* testsuite/special_functions/10_cyl_neumann/compile.cc: Likewise.
	* testsuite/special_functions/10_cyl_neumann/compile_2.cc: Likewise.
	* testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
	* testsuite/special_functions/11_ellint_1/check_value.cc: Likewise.
	* testsuite/special_functions/11_ellint_1/compile.cc: Likewise.
	* testsuite/special_functions/11_ellint_1/compile_2.cc: Likewise.
	* testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
	* testsuite/special_functions/12_ellint_2/check_value.cc: Likewise.
	* testsuite/special_functions/12_ellint_2/compile.cc: Likewise.
	* testsuite/special_functions/12_ellint_2/compile_2.cc: Likewise.
	* testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
	* testsuite/special_functions/13_ellint_3/check_value.cc: Likewise.
	* testsuite/special_functions/13_ellint_3/compile.cc: Likewise.
	* testsuite/special_functions/13_ellint_3/compile_2.cc: Likewise.
	* testsuite/special_functions/14_expint/check_nan.cc: Likewise.
	* testsuite/special_functions/14_expint/check_value.cc: Likewise.
	* testsuite/special_functions/14_expint/compile.cc: Likewise.
	* testsuite/special_functions/14_expint/compile_2.cc: Likewise.
	* testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
	* testsuite/special_functions/15_hermite/check_value.cc: Likewise.
	* testsuite/special_functions/15_hermite/compile.cc: Likewise.
	* testsuite/special_functions/15_hermite/compile_2.cc: Likewise.
	* testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
	* testsuite/special_functions/16_laguerre/check_value.cc: Likewise.
	* testsuite/special_functions/16_laguerre/compile.cc: Likewise.
	* testsuite/special_functions/16_laguerre/compile_2.cc: Likewise.
	* testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
	* testsuite/special_functions/17_legendre/check_value.cc: Likewise.
	* testsuite/special_functions/17_legendre/compile.cc: Likewise.
	* testsuite/special_functions/17_legendre/compile_2.cc: Likewise.
	* testsuite/special_functions/18_riemann_zeta/check_nan.cc: Likewise.
	* testsuite/special_functions/18_riemann_zeta/check_value.cc:
	Likewise.
	* testsuite/special_functions/18_riemann_zeta/compile.cc: Likewise.
	* testsuite/special_functions/18_riemann_zeta/compile_2.cc: Likewise.
	* testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
	* testsuite/special_functions/19_sph_bessel/check_value.cc: Likewise.
	* testsuite/special_functions/19_sph_bessel/compile.cc: Likewise.
	* testsuite/special_functions/19_sph_bessel/compile_2.cc: Likewise.
	* testsuite/special_functions/20_sph_legendre/check_nan.cc: Likewise.
	* testsuite/special_functions/20_sph_legendre/check_value.cc:
	Likewise.
	* testsuite/special_functions/20_sph_legendre/compile.cc: Likewise.
	* testsuite/special_functions/20_sph_legendre/compile_2.cc: Likewise.
	* testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
	* testsuite/special_functions/21_sph_neumann/check_value.cc: Likewise.
	* testsuite/special_functions/21_sph_neumann/compile.cc: Likewise.
	* testsuite/special_functions/21_sph_neumann/compile_2.cc: Likewise.

From-SVN: r238986
2016-08-02 14:32:16 +01:00
Jonathan Wakely
69332dba20 Make TR1 special function tests support C++98
* testsuite/tr1/5_numerical_facilities/special_functions/
	08_cyl_bessel_i/check_value.cc: Use __attribute__((unused)) instead
	of [[gnu::unused]].
	* testsuite/tr1/5_numerical_facilities/special_functions/
	09_cyl_bessel_j/check_value.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	10_cyl_bessel_k/check_value.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	11_cyl_neumann/check_value.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	21_sph_bessel/check_value.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/
	23_sph_neumann/check_value.cc: Likewise.

From-SVN: r238985
2016-08-02 14:32:02 +01:00
Rainer Orth
e15396276e Update Solaris baselines
* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.11/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.11/amd64/baseline_symbols.txt: Likewise.
	* config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: Likewise.

From-SVN: r238984
2016-08-02 11:18:44 +00:00
Jonathan Wakely
e877144da9 Skip scan-assembler test when -flto is used
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Skip
	test if -flto used.

From-SVN: r238981
2016-08-02 11:02:25 +01:00
Jonathan Wakely
c1b6948e1b Support using -flto with libstdc++ testsuite
* testsuite/lib/libstdc++.exp (v3-build_support): Add -fno-lto to
	additional flags for compiling libtestc++.a objects.

From-SVN: r238978
2016-08-02 10:40:50 +01:00
Jonathan Wakely
92d58deefa Add non-const std::basic_string::data() for C++17
* include/bits/basic_string.h (data() const): Update comment.
	(data()): Add non-const overload for C++17.
	* testsuite/21_strings/basic_string/operations/data/char/2.cc: New.
	* testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc: New.

From-SVN: r238963
2016-08-01 21:12:58 +01:00
Jonathan Wakely
0f86525ae0 Disable std::string and std::wstring extern templates for C++17
* include/bits/basic_string.tcc: Disable explicit instantiation
	declarations for C++17.

From-SVN: r238959
2016-08-01 17:06:03 +01:00
Jonathan Wakely
9839ff60d0 Remove ignored "xfail" from dg-do compile directives
* testsuite/23_containers/unordered_map/requirements/53339.cc: Remove
	ignored "xfail" from { dg-do compile { xfail selector } } directive.
	* testsuite/23_containers/unordered_multimap/requirements/53339.cc:
	Likewise.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++11.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++98.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c.cc: Likewise.

From-SVN: r238954
2016-08-01 15:13:06 +01:00
Jonathan Wakely
cbcc9fe8b8 Fix __gnu_cxx::hash_set test to pass in C++98 mode
* testsuite/backward/hash_set/check_construct_destroy.cc: Account
	for different construct/destroy counts in C++98 mode.

From-SVN: r238952
2016-08-01 13:45:47 +01:00
Jonathan Wakely
7481147265 Remove "-x c" from dg-options in libstdc++ C++ test
* testsuite/17_intro/freestanding.cc: Remove "-x c" from dg-options.

From-SVN: r238946
2016-08-01 13:18:23 +01:00
Jonathan Wakely
a02a61eeaa Limit std::tuple tests to run for C++11 and later
* testsuite/20_util/tuple/cons/66338.cc: Limit test to C++11 and
	later.
	* testsuite/20_util/tuple/cons/element_accepts_anything_byval.cc:
	Likewise.

From-SVN: r238945
2016-08-01 13:18:18 +01:00
Jonathan Wakely
98b5fb3cbc Make libstdc++ debug mode test valid for C++98
* testsuite/25_algorithms/lower_bound/debug/irreflexive.cc: Use
	C++98-compatible initialization for array.

From-SVN: r238944
2016-08-01 13:18:13 +01:00
Jonathan Wakely
6f3b889189 Remove unused headers and variables from libstdc++ tests
* testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: Remove
	unused header and variable from compile-only test.
	* testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc: Likewise.
	* testsuite/28_regex/basic_regex/assign/char/cstring.cc: Likewise.
	* testsuite/28_regex/basic_regex/ctors/string_wchar_t.cc: Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc:
	Likewise.

From-SVN: r238943
2016-08-01 13:18:08 +01:00
Jonathan Wakely
2ab794ebf5 Remove duplicate dg-options directive in string_view test
* testsuite/experimental/string_view/operations/rfind/char/2.cc:
	Remove duplicate dg-options directive.

From-SVN: r238942
2016-08-01 13:17:59 +01:00
Jonathan Wakely
4d16871b22 Use -std=gnu++98 instead of -std=gnu++03 in test
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
	808590.cc: Use -std=gnu++98 instead of -std=gnu++03.

From-SVN: r238941
2016-08-01 13:17:54 +01:00
Jonathan Wakely
e350983522 Remove linker options from compile-only tests
* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Remove
	linker options from compile-only tests.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
	Likewise.

From-SVN: r238940
2016-08-01 13:17:49 +01:00
Jonathan Wakely
9b46e4d6dd Run std::ios_base enum tests for C++11 and up
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Make test
	supported for C++11 and later.
	* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
	* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.

From-SVN: r238939
2016-08-01 13:17:43 +01:00
Uros Bizjak
77c3c27ecc baseline_symbols.txt: Update.
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r238934
2016-08-01 09:35:22 +02:00
Jonathan Wakely
c4da1da21e Change std::conditional test to compile-only
* testsuite/20_util/conditional/requirements/typedefs.cc: Change to
	compile-only test.

From-SVN: r238930
2016-07-31 20:37:14 +01:00
Jonathan Wakely
9d5b70b036 Ensure std::atomic test is compiled with optimization
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Ensure test is compiled with optimization.

From-SVN: r238929
2016-07-31 20:30:16 +01:00
Jonathan Wakely
ee62805728 Fix DR 438 std::list test to pass in C++98 mode
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Adjust dg-prune-output pattern for error in C++98 mode.

From-SVN: r238928
2016-07-31 20:21:59 +01:00
Jonathan Wakely
d23d1bee8c Enable std::regex test for C++11 or later
* testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: Only
	run for C++11 or later.

From-SVN: r238927
2016-07-31 19:54:31 +01:00
Jonathan Wakely
f2738d6cf2 Fix non-portable std::regex test and test more cases
* testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: Fix
	test to not rely on GNU extension (escaped normal characters in POSIX
	BRE). Enable tests for other strings which are now supported.

From-SVN: r238926
2016-07-31 19:46:30 +01:00
Jonathan Wakely
77f3d97909 Allow std::pair test to run in C++11 mode too
* testsuite/20_util/pair/astuple/get_neg.cc: Use effective-target
	c++11 instead of setting -std=gnu++14.

From-SVN: r238925
2016-07-31 19:12:28 +01:00
Jonathan Wakely
3c040fa4a2 libstdc++/72745 add static assertion for invalid tuple access
PR libstdc++/72745
	* include/std/array (get): Use positive message for static assertions.
	* include/std/functional (_Safe_tuple_element_t): Fix indentation.
	* include/std/tuple (tuple_element<I, tuple<>>): Add partial
	specialization for invalid indices, with static assertion.
	* testsuite/20_util/tuple/element_access/get_neg.cc: New test.

From-SVN: r238924
2016-07-31 18:08:52 +01:00
Jonathan Wakely
f245e3a0ee Move dg-error directives to relevant lines
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Move
	dg-error to relevant line.
	* testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc:
	Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/26_numerics/headers/cmath/types_std_c++0x_neg.cc:
	Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/
	requirements/non_uint_neg.cc: Likewise.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc:
	Likewise. Also test for std::atomic_address.

From-SVN: r238923
2016-07-31 17:51:08 +01:00
Ville Voutilainen
8c9142276b Add missing variable traits, fix testsuite failures.
* include/bits/uses_allocator.h (uses_allocator_v): New.
	* include/std/functional (is_bind_expression_v, is_placeholder_v):
	Likewise.
	* testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/duration/literals/range.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
	* testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
	New.

From-SVN: r238921
2016-07-31 17:52:53 +03:00
Jonathan Wakely
2f2971492b Check __STRICT_ANSI__ for 128-bit arithmetic types
* testsuite/18_support/numeric_limits/40856.cc [__STRICT_ANSI__]: Do
	not test 128-bit types.
	* testsuite/20_util/is_floating_point/value.cc: Likewise.
	* testsuite/20_util/is_integral/value.cc: Likewise.
	* testsuite/20_util/is_signed/value.cc: Likewise.
	* testsuite/20_util/is_unsigned/value.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
	Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
	Likewise.

From-SVN: r238918
2016-07-31 14:06:38 +01:00
Jonathan Wakely
7523c5eb1a Fix file extension of libstdc++ test
* testsuite/26_numerics/headers/cstdlib/54686.c: Rename to 54686.cc.

From-SVN: r238917
2016-07-31 14:03:46 +01:00
Ville Voutilainen
137422c80c Implement C++17 variable templates for type traits.
* include/std/chrono (treat_as_floating_point_v): New.
	* include/std/ratio (ratio_equal_v, ratio_not_equal_v)
	(ratio_less_v, ratio_less_equal_v, ratio_greater_v)
	(ratio_greater_equal_v): Likewise.
	* include/std/system_error (is_error_code_enum_v)
	(is_error_condition_enum_v): Likewise.
	* include/std/tuple (tuple_size_v): Likewise.
	* type_traits (conjunction_v, disjunction_v, negation_v)
	(is_void_v, is_null_pointer_v, is_integral_v, is_floating_point_v)
	(is_array_v, is_pointer_v, is_lvalue_reference_v)
	(is_rvalue_reference_v, is_member_object_pointer_v)
	(is_member_function_pointer_v, is_enum_v, is_union_v)
	(is_class_v, is_function_v, is_reference_v, is_arithmetic_v)
	(is_fundamental_v, is_object_v, is_scalar_v, is_compound_v)
	(is_member_pointer_v, is_const_v, is_volatile_v, is_trivial_v)
	(is_trivially_copyable_v, is_standard_layout_v)
	(is_pod_v, is_literal_type_v, is_empty_v, is_polymorphic_v)
	(is_abstract_v, is_final_v, is_signed_v, is_unsigned_v)
	(is_constructible_v, is_default_constructible_v)
	(is_copy_constructible_v, is_move_constructible_v)
	(is_assignable_v, is_copy_assignable_v, is_move_assignable_v)
	(is_destructible_v, is_trivially_constructible_v)
	(is_trivially_default_constructible_v)
 	(is_trivially_copy_constructible_v, is_trivially_move_constructible_v)
	(is_trivially_assignable_v, is_trivially_copy_assignable_v)
	(is_trivially_move_assignable_v, is_trivially_destructible_v)
	(is_nothrow_constructible_v, is_nothrow_default_constructible_v)
	(is_nothrow_copy_constructible_v, is_nothrow_move_constructible_v)
	(is_nothrow_assignable_v, is_nothrow_copy_assignable_v)
	(is_nothrow_move_assignable_v, is_nothrow_destructible_v)
	(has_virtual_destructor_v, alignment_of_v, rank_v, extent_v)
	(is_same_v, is_base_of_v, is_convertible_v): Likewise.
	* testsuite/19_diagnostics/error_code/is_error_code_v.cc: Likewise.
	* testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
	Likewise.
	* testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
	* testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
	* testsuite/20_util/variable_templates_for_traits.cc: Likewise.

From-SVN: r238892
2016-07-29 22:01:39 +03:00
Andreas Schwab
0c4c49092a Update libstdc++ baseline symbols for aarch64, ia64, m68k
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r238860
2016-07-29 11:41:05 +00:00
Jonathan Wakely
13ec6e5e06 Update libstdc++ docs for library version history
* doc/xml/manual/abi.xml: Document 6.0.22 library version.
	* doc/html/manual/abi.html: Regenerate.

From-SVN: r238855
2016-07-29 11:55:03 +01:00
Jonathan Wakely
62589e99d1 New libstdc++ symbol version for new basic_string symbols
* acinclude.m4 (libtool_VERSION): Bump to 6:23:0.
	* config/abi/pre/gnu.ver: Add 3.4.23 version for new basic_string
	symbols.
	* configure: Regenerate.
	* testsuite/util/testsuite_abi.cc: Add new symbol version.

From-SVN: r238853
2016-07-29 11:42:17 +01:00
Jonathan Wakely
fe97ccec24 Update libstdc++ baseline symbols for x86 and ppc
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
	Likewise.
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Likewise.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Likewise.
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Likewise.

From-SVN: r238852
2016-07-29 11:42:06 +01:00
Jonathan Wakely
1a2196e484 Fix DR 438 container tests to pass in C++98 mode
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Adjust dg-prune-output pattern for error in C++98 mode.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.

From-SVN: r238837
2016-07-28 22:00:45 +01:00
Jonathan Wakely
e539b4ff2f Fix std::vector test to pass in C++98 mode
* testsuite/23_containers/vector/check_construct_destroy.cc: Account
	for different construct/destroy counts in C++98 mode.

From-SVN: r238836
2016-07-28 22:00:39 +01:00
Jonathan Wakely
c3c2f97308 Use dg-additional-options in libstdc++ tests
* testsuite/17_intro/headers/c++2011/stdc++.cc: Change target-specific
	dg-options to dg-additional-options so that default options are used.
	* testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc:
	Likewise.
	* testsuite/17_intro/headers/c++2014/stdc++.cc: Likewise.
	* testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc:
	Likewise.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Use dg-additional-options instead of repeating the common options.

From-SVN: r238835
2016-07-28 22:00:34 +01:00
Jonathan Wakely
2de6b25424 Fix invalid dg-do directives in libstdc++ tests
* testsuite/22_locale/conversions/string/1.cc: Remove unintended
	dg-do compile directive.
	* testsuite/26_numerics/headers/cmath/fabs_inline.cc: Fix syntax of
	dg-do directive.
	* testsuite/26_numerics/valarray/const_bracket.cc: Likewise.

From-SVN: r238834
2016-07-28 22:00:19 +01:00
Ville Voutilainen
ca8f2cb137 Implement std::string_view and P0254r2,
Integrating std::string_view and std::string.
	* include/Makefile.am: Add string_view and string_view.tcc
	to the exported headers.
	* include/Makefile.in: Likewise.
	* include/bits/basic_string.h: Include <string_view> in C++17 mode.
	(__sv_type): New.
	(basic_string(__sv_type, const _Alloc&)): Likewise.
	(operator=(__sv_type)): Likewise.
	(operator __sv_type()): Likewise.
	(operator+=(__sv_type)): Likewise.
	(append(__sv_type __sv)): Likewise.
	(append(__sv_type, size_type, size_type)): Likewise.
	(assign(__sv_type)): Likewise.
	(assign(__sv_type, size_type, size_type)): Likewise.
	(insert(size_type, __sv_type)): Likewise.
	(insert(size_type, __sv_type, size_type, size_type)): Likewise.
	(replace(size_type, size_type, __sv_type)): Likewise.
	(replace(size_type, size_type, __sv_type, size_type, size_type)):
	Likewise.
	(replace(const_iterator, const_iterator, __sv_type)): Likewise.
	(find(__sv_type, size_type)): Likewise.
	(rfind(__sv_type, size_type)): Likewise.
	(find_first_of(__sv_type, size_type)): Likewise.
	(find_last_of(__sv_type, size_type)): Likewise.
	(find_first_not_of(__sv_type, size_type)): Likewise.
	(find_last_not_of(__sv_type, size_type)): Likewise.
	(compare(__sv_type)): Likewise.
	(compare(size_type, size_type, __sv_type)): Likewise.
	(compare(size_type, size_type, __sv_type, size_type, size_type)):
	Likewise.
	* include/bits/string_view.tcc: New.
	* include/std/string_view: Likewise.
	* testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/char/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
	Likewise.
	* testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
	* testsuite/21_strings/basic_string/operators/wchar_t/5.cc: Likewise.
	* testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/include.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/1.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/char/3.cc: Likewise.
	* testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/operators/char/2.cc: Likewise.
	* testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/range_access/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
	Likewise.
	* testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
	* testsuite/21_strings/basic_string_view/types/1.cc: Likewise.

From-SVN: r238823
2016-07-28 18:15:26 +03:00
Jonathan Wakely
427f68c6c2 * testsuite/20_util/forward/1_neg.cc: Move dg-error to right line.
From-SVN: r238793
2016-07-27 18:32:45 +01:00
Georeth Chow
a837417c79 Fix missing qualification in <ext/rope>
2016-07-25  Georeth Chow  <georeth2010@gmail.com>

	* include/ext/ropeimpl.h (rope<>::_S_dump(_RopeRep*, int)): Qualify
	_S_concat enumerator.
	* testsuite/ext/rope/6.cc: New test.

From-SVN: r238711
2016-07-25 13:56:12 +01:00
Jonathan Wakely
19bb30c065 Use std::mt19937, std::thread and std::atomic to simplify tests
* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Use
	std::mt19937, std::thread and std::atomic to simplify test.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.

From-SVN: r238703
2016-07-25 11:31:53 +01:00
Jonathan Wakely
8cab3d18f0 Move allocator in std::string and RB tree move constructors
PR libstdc++/71964
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::_Alloc_hider(pointer, _Alloc&&)): Add constructor.
	* include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&)): Move allocator.
	* testsuite/21_strings/basic_string/allocator/71964.cc: New test.
	* testsuite/23_containers/set/allocator/71964.cc: New test.

From-SVN: r238647
2016-07-22 16:03:11 +01:00
Jonathan Wakely
960637ac1a Use correct form of delete in libstdc++.exp
* testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): Use
	delete[] instead of delete.

From-SVN: r238632
2016-07-22 09:33:26 +01:00
Jonathan Wakely
8b649cd3ba Fix naming, qualification and broken test for propagate_const
* include/experimental/propagate_const (propagate_const::__t): Rename
	to _M_t and remove comment. Qualify std::move and std::forward.
	* testsuite/experimental/propagate_const/cons/default.cc: Fix test.

From-SVN: r238611
2016-07-21 20:39:03 +01:00
Jonathan Wakely
509b778f6c Define missing delete operators in libstdc++ testsuite
* testsuite/23_containers/vector/zero_sized_allocations.cc:
	Define sized deallocation function.
	* testsuite/util/testsuite_new_operators.h:
	(operator delete(void*, const std::nothrow_t&)): Define nothrow
	deallocation function.

From-SVN: r238610
2016-07-21 20:38:57 +01:00
Jonathan Wakely
e93a101f83 Fix out-of-bound array accesses in libstdc++ testsuite
* testsuite/21_strings/basic_string/modifiers/append/char/1.cc: Fix
	reads past the end of strings.
	* testsuite/21_strings/basic_string/operations/compare/char/1.cc:
	Likewise.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Fix
	invalid array accesses.
	* testsuite/experimental/string_view/operations/compare/char/1.cc:
	Fix read past the end of string.
	* testsuite/util/testsuite_character.cc: Fix out-of-bounds write.

From-SVN: r238609
2016-07-21 20:38:51 +01:00
Jonathan Wakely
0a024155c4 Fix missing returns in libstdc++ testsuite
* testsuite/24_iterators/container_access.cc: Fix missing returns.
	* testsuite/24_iterators/range_access_cpp14.cc: Likewise.

From-SVN: r238608
2016-07-21 20:38:44 +01:00
Jonathan Wakely
22620c1452 Remove memory leaks in libstdc++ testsuite
* testsuite/18_support/new_delete_placement.cc: Don't allocate (and
	leak) memory for arguments to placement delete.
	* testsuite/20_util/addressof/1.cc: Don't leak memory.
	* testsuite/22_locale/locale/global_locale_objects/3.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/insert/55028-debug.cc:
	Likewise.

From-SVN: r238607
2016-07-21 20:38:32 +01:00
Jonathan Wakely
09a855ae3c Document LWG DR 2684 status and regenerate libstdc++ manual
* doc/xml/manual/intro.xml: Document DR 2684 status.
	* doc/html/*: Regenerate.

From-SVN: r238535
2016-07-20 19:22:05 +01:00
Jonathan Wakely
e87b7d52c3 LWG 2441 Provide exact-width atomic typedefs
* include/std/atomic (atomic_int8_t, atomic_uint8_t, atomic_int16_t)
	(atomic_uint16_t, atomic_int32_t, atomic_uint32_t, atomic_int64_t)
	(atomic_uint64_t): Define (LWG 2441).
	* testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Remove empty
	lines.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Test for
	the new types.
	* doc/xml/manual/intro.xml: Document DR 2441 status.

From-SVN: r238534
2016-07-20 19:21:59 +01:00
Jonathan Wakely
07c772ed4e LWG 2328 Rvalue stream extraction should use perfect forwarding
* include/std/istream (operator>>(basic_istream&&, _Tp&)): Adjust
	to use perfect forwarding (LWG 2328).
	* testsuite/27_io/rvalue_streams.cc: Test perfect forwarding.
	* doc/xml/manual/intro.xml: Document DR 2328 status.

From-SVN: r238533
2016-07-20 19:21:53 +01:00
Jonathan Wakely
18407bfb2c Use static pointer to member when catching nullptr
libstdc++-v3:

	* libsupc++/pbase_type_info.cc (__pbase_type_info::__do_catch): Use
	static objects for catching nullptr as pointer to member types.

gcc/testsuite:

	* g++.dg/cpp0x/nullptr35.C: Change expected result for catching as
	pointer to member function and also test catching by reference.

From-SVN: r238532
2016-07-20 19:21:48 +01:00
Ville Voutilainen
40f3e91334 Clean up optional's comments.
From-SVN: r238436
2016-07-18 17:45:56 +03:00
Jonathan Wakely
4f5f9962c8 Replace references to C++0x with C++11 in comments
* include/bits/algorithmfwd.h: Change C++0x to C++11 in comments.
	* include/bits/move.h: Likewise.
	* include/bits/postypes.h: Likewise.
	* include/debug/bitset: Likewise.
	* include/ext/pb_ds/detail/type_utils.hpp: Likewise.
	* include/ext/string_conversions.h: Change C++0x to __cxx11 in
	comment.
	* testsuite/27_io/fpos/14320-1.cc: Change C++0x to C++11 in comment.
	* testsuite/util/thread/all.h: Likewise.

From-SVN: r238402
2016-07-15 21:23:08 +01:00
Jonathan Wakely
d1129d45b0 Remove redundant std::move in std::for_each
* include/bits/stl_algo.h (for_each): Remove redundant _GLIBCXX_MOVE
	and adjust comment.

From-SVN: r238399
2016-07-15 20:51:33 +01:00
Jonathan Wakely
479d0ed590 c++/58796 Make nullptr match exception handlers of pointer type
libstdc++-v3:

	PR c++/58796
	* libsupc++/pbase_type_info.cc (__pbase_type_info::__do_catch): Make
	nullptr match handlers of pointer type.

gcc/testsuite:

	PR c++/58796
	* g++.dg/cpp0x/nullptr21.C: Remove void* handlers.
	* g++.dg/cpp0x/nullptr35.C: New test.

From-SVN: r238396
2016-07-15 19:51:51 +01:00
Edward Smith-Rowland
4db1cb44be Implement C++17 P0025 clamp.
2016-07-15  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++17 P0025 clamp.
	* include/bits/algorithmfwd.h: Declare clamp overloads.
	* include/bits/stl_algo.h: Implement clamp.  Feature __cpp_lib_clamp.
	* testsuite/25_algorithms/clamp/1.cc: New test.
	* testsuite/25_algorithms/clamp/2.cc: New test.
	* testsuite/25_algorithms/clamp/constexpr.cc: New test.
	* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/
	1.cc: New test.
	* testsuite/25_algorithms/clamp/requirements/explicit_instantiation/
	pod.cc: New test.

From-SVN: r238383
2016-07-15 17:16:32 +00:00
Ville Voutilainen
1ec0f76305 Fix the constraints for any's assignment operator template to properly
reject assignment from a non-copyable lvalue.

From-SVN: r238365
2016-07-15 10:44:22 +03:00
Jonathan Wakely
ea5ec6b7e0 Include header for std::__parallel::search
* include/experimental/functional: Include <parallel/algorithm> in
	Parallel Mode.

From-SVN: r238342
2016-07-14 16:43:17 +01:00
Jonathan Wakely
47d5cb3c3b Add header for std::search to testcase
* testsuite/experimental/functional/searchers.cc: Include <algorithm>
	for std::search.

From-SVN: r238341
2016-07-14 16:27:09 +01:00
Jonathan Wakely
0a2bf18874 Improve doxygen comments for allocators in containers
PR libstdc++/70716
	* include/bits/forward_list.h (forward_list): Update doxygen comments
	to reflect allocator propagation semantics. Remove ambiguous
	statements about data being lost.
	* include/bits/stl_deque.h (deque): Likewise.
	* include/bits/stl_list.h (list): Likewise.
	* include/bits/stl_map.h (map): Likewise.
	* include/bits/stl_multimap.h (multimap): Likewise.
	* include/bits/stl_multiset.h (multiset): Likewise.
	* include/bits/stl_set.h (set): Likewise.
	* include/bits/stl_vector.h (vector): Likewise.
	* include/bits/unordered_map.h (unordered_map, unordered_multimap):
	Likewise.
	* include/bits/unordered_set.h (unordered_set, unordered_multiset):
	Likewise.

From-SVN: r238332
2016-07-14 11:02:10 +01:00
Ville Voutilainen
25a69162c9 Implement P0032R3, Homogeneous interface for variant, any and optional,
for the parts concerning any and optional.
	* include/std/any (_Storage()): Make constexpr and have it
	initialize _M_ptr.
	(any()): Make constexpr.
	(any(const any&)): Adjust.
	(any(any&&)): Likewise.
	(__any_constructible_t): New.
	(any(_ValueType&&)): Constrain.
	(any(in_place_type_t<_Tp>, _Args&&...)): New.
	(any(in_place_type_t<_Tp>, initializer_list<_Up>, _Args&&...)):
	Likewise.
	(~any()): Adjust.
	(operator=(const any&)): Likewise.
	(operator=(any&&)): Likewise.
	(operator=(_ValueType&&)): Constrain.
	(emplace(_Args&&...)): New.
	(emplace(initializer_list<_Up>, _Args&&...)): Likewise.
	(clear()): Remove.
	(reset()): New.
	(swap(any&)): Adjust.
	(empty()): Remove.
	(has_value()): New.
	(type()): Adjust.
	(_Manager_internal::_S_create(_Storage&, _Args&&...)): New.
	(_Manager_external::_S_create(_Storage&, _Args&&...)): Likewise.
	(make_any(_Args&&...)): Likewise.
	(make_any(initializer_list<_Up>, _Args&&...)): Likewise.
	* include/std/optional (in_place_t, in_place): Remove.
	(bad_optional_access): Add a comment referring to LEWG 72.
	(emplace(_Args&&...)): Constrain.
	(has_value()): New.
	(reset()): Likewise.
	(make_optional(_Args&&...)): Likewise.
	(make_optional(initializer_list<_Up>, _Args&&...)): Likewise.
	* include/std/utility (in_place_tag): New.
	(__in_place, __in_place_type, __in_place_index): Likewise.
	(in_place_t, in_place_type_t, in_place_index_t): Likewise.
	(in_place(__in_place*)): Likewise.
	(in_place(__in_place_type<_Tp>*)): Likewise.
	(in_place(__in_place_index<_Idx>*)): Likewise.
	* testsuite/20_util/any/assign/1.cc: Adjust.
	* testsuite/20_util/any/assign/emplace.cc: New.
	* testsuite/20_util/any/assign/self.cc: Adjust.
	* testsuite/20_util/any/cons/1.cc: Likewise.
	* testsuite/20_util/any/cons/in_place.cc: New.
	* testsuite/20_util/any/make_any.cc: Likewise.
	* testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.
	* testsuite/20_util/any/misc/swap.cc: Likewise.
	* testsuite/20_util/any/modifiers/1.cc: Likewise.
	* testsuite/20_util/any/requirements.cc: New.
	* testsuite/20_util/in_place/requirements.cc: Likewise.
	* testsuite/20_util/optional/constexpr/in_place.cc: Adjust.
	* testsuite/20_util/optional/in_place.cc: Likewise.
	* testsuite/20_util/optional/make_optional.cc: Add tests for
	the new overloads of make_optional.

From-SVN: r238329
2016-07-14 12:10:05 +03:00
Ville Voutilainen
c0d31471ba Fix ChangeLog.
From-SVN: r238328
2016-07-14 12:09:50 +03:00
Jonathan Wakely
e383deac8b libstdc++/71856 Define _GLIBCXX_PARALLEL_ASSERTIONS
PR libstdc++/71856
	* include/bits/c++config (_GLIBCXX_ASSERTIONS): Define to 1 not empty.
	* include/parallel/compiletime_settings.h (_GLIBCXX_ASSERTIONS):
	Rename to _GLIBCXX_PARALLEL_ASSERTIONS and make default value depend
	on _GLIBCXX_ASSERTIONS.
	* include/parallel/balanced_quicksort.h: Rename _GLIBCXX_ASSERTIONS.
	Include <unistd.h> for sleep.
	* include/parallel/losertree.h: Rename _GLIBCXX_ASSERTIONS.
	* include/parallel/merge.h: Likewise.
	* include/parallel/multiway_merge.h: Likewise.
	* include/parallel/partition.h: Likewise.
	* include/parallel/queue.h: Likewise.
	* include/parallel/sort.h: Likewise.
	* testsuite/25_algorithms/headers/algorithm/
	parallel_algorithm_assert.cc: New.

From-SVN: r238307
2016-07-13 18:22:57 +01:00
Jonathan Wakely
17f8dc9367 Make basic_string::replace forward to different overload
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(replace(__const_iterator, __const_iterator, initializer_list<C>)):
	Forward to different overload.

From-SVN: r238306
2016-07-13 18:22:51 +01:00
Jonathan Wakely
260d92cd0d Make __allocated_ptr::_S_raw_ptr static
* include/bits/allocated_ptr.h (__allocated_ptr::_S_raw_ptr): Make
	static.

From-SVN: r238305
2016-07-13 18:22:47 +01:00
Jonathan Wakely
2d60da1031 Revert "Add non-const overload of std::string::data()"
This reverts r238291 aka 4300aa2087d90cd2d55852fa38f082a89bc7e72d.

From-SVN: r238303
2016-07-13 16:56:46 +01:00
Ville Voutilainen
05505e9d69 Fix ChangeLog.
From-SVN: r238293
2016-07-13 14:27:37 +03:00
Ville Voutilainen
86c0ec1de1 Implement P0307R2, Making Optional Greater Equal Again.
* include/experimental/optional (_Has_addressof): Fix the comment.
	* include/std/optional (_Has_addressof): Likewise.
	(operator=(_Up&&)): Constrain.
	(operator=(const optional<_Up>&)): Likewise.
	(operator=(optional<_Up>&&)): Likewise.
	(__optional_relop_t): New.
	(operator==(const optional<_Tp>&, const optional<_Tp>&)): Constrain.
	(operator!=(const optional<_Tp>&, const optional<_Tp>&)):
	Constrain and make transparent.
	(operator<(const optional<_Tp>&, const optional<_Tp>&)): Constrain.
	(operator>(const optional<_Tp>&, const optional<_Tp>&)):
	Constrain and make transparent.
	(operator<=(const optional<_Tp>&, const optional<_Tp>&)): Likewise.
	(operator>=(const optional<_Tp>&, const optional<_Tp>&)): Likewise.
	(operator==(const optional<_Tp>&, const _Tp&): Constrain.
	(operator==(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator!=(const optional<_Tp>&, _Tp const&)):
	Constrain and make transparent.
	(operator!=(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator<(const optional<_Tp>&, const _Tp&)): Constrain.
	(operator<(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator>(const optional<_Tp>&, const _Tp&)):
	Constrain and make transparent.
	(operator>(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator<=(const optional<_Tp>&, const _Tp&)): Likewise.
	(operator<=(const _Tp&, const optional<_Tp>&)): Likewise.
	(operator>=(const optional<_Tp>&, const _Tp&)): Likewise.
	(operator>=(const _Tp&, const optional<_Tp>&)): Likewise.
	* testsuite/20_util/optional/constexpr/relops/2.cc: Adjust.
	* testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
	* testsuite/20_util/optional/relops/1.cc: Likewise.
	* testsuite/20_util/optional/relops/2.cc: Likewise.
	* testsuite/20_util/optional/relops/3.cc: Likewise.
	* testsuite/20_util/optional/relops/4.cc: Likewise.
	* testsuite/20_util/optional/requirements.cc: Add tests to verify
	that optional's relops are transparent and don't synthesize
	operators. Also test that assignment sfinaes.

From-SVN: r238292
2016-07-13 14:25:51 +03:00