Commit Graph

57 Commits

Author SHA1 Message Date
Jonathan Wakely
dc0d363ff9 Update value of __cpp_lib_chrono feature-test macro
* include/std/chrono (__cpp_lib_chrono): Update macro value to
	indicate support for P0505R0.
	* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Check
	for updated macro.

From-SVN: r253960
2017-10-20 22:06:20 +01:00
Jonathan Wakely
c2f99c9d9a PR libstdc++/81468 constrain std::chrono::time_point constructor
PR libstdc++/81468
	* include/std/chrono (time_point(const time_point<_Dur2>&)): Add
	missing constraint from LWG DR 1177.
	* testsuite/20_util/duration/cons/dr1177.cc: New.
	* testsuite/20_util/time_point/cons/81468.cc: New.
	* testsuite/20_util/duration/literals/range.cc: Update dg-error line.

From-SVN: r252090
2017-09-13 16:20:21 +01:00
Daniel Kruegler
288695f7a4 Implement P0607R0 "Inline Variables for Standard Library" for C++17
2017-03-23  Daniel Kruegler  <daniel.kruegler@gmail.com>

	* include/bits/c++config (_GLIBCXX17_INLINE): Define.
	* include/bits/regex_constants.h (All std::regex_constants constants):
	Add _GLIBCXX17_INLINE as per P0607R0.
	* include/bits/std_mutex.h (defer_lock, try_to_lock, adopt_lock):
	Likewise.
	* include/bits/stl_pair.h (piecewise_construct): Likewise.
	* include/bits/uses_allocator.h (allocator_arg, uses_allocator_v)
	(__is_uses_allocator_constructible_v)
	(__is_nothrow_uses_allocator_constructible_v): Likewise.
	* include/std/chrono (treat_as_floating_point_v): Likewise.
	* include/std/functional (is_bind_expression_v, is_placeholder_v):
	Likewise.
	* include/std/optional (nullopt): Likewise.
	* 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, ignore): Likewise.
	(ignore): Declare ignore constexpr as per LWG 2773, declare assignment
	constexpr as per LWG 2933.
	* include/std/type_traits (All variable templates): Add
	_GLIBCXX17_INLINE as per P0607R0.
	* include/std/variant (variant_size_v, variant_npos, __index_of_v)
	(__tuple_count_v, __exactly_once): Likewise.
	* testsuite/18_support/headers/new/synopsis.cc
	(hardware_destructive_interference_size)
	(hardware_constructive_interference_size): Likewise for commented-out
	variables.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Add new
	test function for constexpr std::ignore (LWG 2773).
	* testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc: New
	test for LWG 2933.

From-SVN: r246423
2017-03-23 19:40:07 +00:00
Dinka Ranns
1dee318ad8 C++17 GB50 resolution (P0505R0)
2017-02-19  Dinka Ranns  <dinka.ranns@googlemail.com>

	C++17 GB50 resolution
	* include/std/chrono (duration::operator++()): Add
	_GLIBCXX17_CONSTEXPR.
	(duration::operator++(int)): Likewise.
	(duration::operator--()): Likewise.
	(duration::operator--(int)): Likewise.
	(duration::operator+=(const duration&)): Likewise.
	(duration::operator-=(const duration&)): Likewise.
	(duration::operator*=(const rep&)): Likewise.
	(duration::operator/=(const rep&)): Likewise.
	(duration::operator%=(const rep&)): Likewise.
	(duration::operator%=(const duration&)): Likewise.
	(time_point::operator+=(const duration&)): Likewise.
	(time_point::operator-=(const duration&)): Likewise.
	* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: New test.
	* testsuite/20_util/duration/literals/range.cc: Adjust dg-error.
	* testsuite/20_util/time_point/arithmetic/constexpr.cc: New test.

From-SVN: r245575
2017-02-19 16:04:35 +00:00
Jakub Jelinek
cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +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
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
b236debd3b * include/std/chrono (system_clock): Fix typo in comment.
From-SVN: r240589
2016-09-28 19:04:23 +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
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
Jonathan Wakely
33ac58d529 Remove trailing whitespace from libstdc++ headers
* include/std/array: Remove trailing whitespace.
	* include/std/atomic: Likewise.
	* include/std/bitset: Likewise.
	* include/std/chrono: Likewise.
	* include/std/complex: Likewise.
	* include/std/condition_variable: Likewise.
	* include/std/fstream: Likewise.
	* include/std/functional: Likewise.
	* include/std/future: Likewise.
	* include/std/iomanip: Likewise.
	* include/std/iosfwd: Likewise.
	* include/std/istream: Likewise.
	* include/std/limits: Likewise.
	* include/std/ratio: Likewise.
	* include/std/scoped_allocator: Likewise.
	* include/std/sstream: Likewise.
	* include/std/stdexcept: Likewise.
	* include/std/string: Likewise.
	* include/std/system_error: Likewise.
	* include/std/thread: Likewise.
	* include/std/tuple: Likewise.
	* include/std/type_traits: Likewise.
	* include/std/utility: Likewise.
	* include/std/valarray: Likewise.
	* include/std/vector: Likewise.

From-SVN: r237528
2016-06-16 14:47:35 +01:00
Jakub Jelinek
818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jonathan Wakely
04f69fda7a re PR libstdc++/65499 (Missing "using namespace literals::chrono_literals" in std::chrono)
PR libstdc++/65499
	* include/std/chrono: Add using-directive for literals to std::chrono.
	* testsuite/20_util/duration/literals/65499.cc: New.

From-SVN: r221730
2015-03-27 12:45:10 +00:00
Jakub Jelinek
5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Edward Smith-Rowland
a15f7cb8b8 Implement SD-6: SG10 Feature Test Recommendations
2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* internal.h (lexer_state, spec_nodes): Add in__has_include__.
	* directives.c: Support __has_include__ builtin.
	* expr.c (parse_has_include): New function to parse __has_include__
	builtin; (eval_token()): Use it.
	* files.c (_cpp_has_header()): New funtion to look for header;
	(open_file_failed()): Not an error to not find a header file for
	__has_include__.
	* identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
	* pch.c (cpp_read_state): Lookup __has_include__.
	* traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
	__has_include__ statements.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* c-cppbuiltin.c (c_cpp_builtins()): Define language feature
	macros and the __has_header macro.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* include/bits/basic_string.h: Add __cpp_lib feature test macro.
	* include/bits/stl_algobase.h: Ditto.
	* include/bits/stl_function.h: Ditto.
	* include/bits/unique_ptr.h: Ditto.
	* include/std/chrono: Ditto.
	* include/std/complex: Ditto.
	* include/std/iomanip: Ditto.
	* include/std/shared_mutex: Ditto.
	* include/std/tuple: Ditto.
	* include/std/type_traits: Ditto.
	* include/std/utility: Ditto.
	* testsuite/experimental/feat-cxx14.cc: New.
	* testsuite/experimental/feat-lib-fund.cc: New.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/duration/literals/range.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Adjust.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* g++.dg/cpp1y/feat-cxx11-neg.C: New.
	* g++.dg/cpp1y/feat-cxx11.C: New.
	* g++.dg/cpp1y/feat-cxx14.C: New.
	* g++.dg/cpp1y/feat-cxx98.C: New.
	* g++.dg/cpp1y/feat-cxx98-neg.C: New.
	* g++.dg/cpp1y/phoobhar.h: New.
	* g++.dg/cpp1y/testinc/phoobhar.h: New.

From-SVN: r215752
2014-10-01 11:49:23 +00:00
Jonathan Wakely
83387bbd28 parse_numbers.h (_Number_help): Fix divide-by-zero.
* include/bits/parse_numbers.h (_Number_help): Fix divide-by-zero.
	* include/std/chrono (_Checked_integral_constant): Allow zero.
	* testsuite/20_util/duration/literals/values.cc: Test non-positive
	values and digit separators.

From-SVN: r211890
2014-06-23 12:30:32 +01:00
Jonathan Wakely
cd1464dbc6 parse_numbers.h (__parse_int::_Number_help): Check for overflow.
* include/bits/parse_numbers.h (__parse_int::_Number_help): Check for
	overflow.
	* include/std/chrono (chrono_literals::__select_type::_Select_type):
	Remove.
	(chrono_literals::_Checked_integral_constant): Define.
	Simplify UDL operator templates and check for overflow.
	* testsuite/20_util/duration/literals/range.cc: New.

From-SVN: r210513
2014-05-16 12:08:49 +01:00
Richard Sandiford
aa118a03c4 Update copyright years in libstdc++-v3/
From-SVN: r206301
2014-01-02 22:30:10 +00:00
Paolo Carlini
66caf47a50 re PR libstdc++/58850 (Conversion error in chrono)
2013-10-23  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/58850
	* include/std/chrono (minutes, hours): Change typedefs to uniformly
	use int64_t.
	* testsuite/20_util/duration/arithmetic/58850.cc: New.

From-SVN: r203978
2013-10-23 15:31:26 +00:00
Edward Smith-Rowland
e9a6449215 basic_string.h (operator""s): Remove space between quotes and literal identifier.
2013-10-22  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* include/bits/basic_string.h (operator""s): Remove space between quotes
	and literal identifier.
	* include/std/chrono (operator""h, operator""min, operator""s,
	operator""ms, operator""us, operator""ns): Ditto.

From-SVN: r203941
2013-10-23 00:12:36 +00:00
Ed Smith-Rowland
0372af98bd Fix library literals error involving namespace __detail.
2013-06-11  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Fix library literals error involving namespace __detail.
	* include/std/chrono: Rename __detail to __select_type. Reformat.
	* include/bits/basic_string.h: Reformat.
	* testsuite/20_util/duration/literals/ns_detail.cc: New.

From-SVN: r199948
2013-06-11 11:00:38 +00:00
Ed Smith-Rowland
88c4d6b798 Simplify and clean up library literals.
2013-06-07  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Simplify and clean up library literals.
	* include/std/chrono: Simplify namespace and versioning management.
	* include/bits/basic_string.h: Ditto.
	* testsuite/20_util/duration/literals/types.cc: Remove bogus comment.
	* testsuite/20_util/duration/literals/values.cc: Ditto.
	* testsuite/21_strings/basic_string/literals/types.cc: Ditto.
	* testsuite/21_strings/basic_string/literals/values.cc: Ditto.

From-SVN: r199861
2013-06-08 22:43:18 +00:00
Ed Smith-Rowland
fa40983341 include/std/chrono: Collapse redundant 'inline' from 'inline constexpr'.
2013-06-01  Ed Smith-Rowland  <3dw4rd@verizon.net>

	include/std/chrono: Collapse redundant 'inline' from 'inline constexpr'.
	include/std/tuple: Ditto.
	include/bits/move.h: Ditto.

From-SVN: r199587
2013-06-01 21:39:50 +00:00
Ed Smith-Rowland
1c9f675fd9 Implement N3642 - User-defined Literals for Standard Library Types
2013-05-30  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement N3642 - User-defined Literals for Standard Library Types
	* include/bits/parse_numbers.h: New.
	* include/std/chrono: Add duration literal operators.
	* include/bits/basic_string.h: Add string literal operators.
	* include/Makefile.in: Add parse_numbers.h.
	* include/Makefile.am: Ditto.
	* testsuite/20_util/duration/literals/values.cc: New.
	* testsuite/20_util/duration/literals/types.cc: New.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust.
	* testsuite/21_strings/basic_string/literals/values.cc: New.
	* testsuite/21_strings/basic_string/literals/types.cc: New.

From-SVN: r199584
2013-06-01 18:37:47 +00:00
Benjamin Kosnik
1f08a74902 chrono: Wrap clocks in inline namespace _V2.
2013-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/chrono: Wrap clocks in inline namespace _V2.
	* src/c++11/chrono.cc: Same.
	* src/c++11/compatibility-chrono.cc: Revert to previous chrono.cc
	file, with default configure macros selected.

	* config/abi/pre/gnu.ver (GLIBCXX_3.4.19): Use symbols from inline
	namespace.
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Fix up.

	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
	Regenerated.
	* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
	Regenerated.
	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt:
	Regenerated.
	* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Regenerated.
	* config/abi/post/solaris2.10/baseline_symbols.txt: Regenerated.
	* config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Regenerated.
	* config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt:
	Regenerated.
	* config/abi/post/solaris2.9/baseline_symbols.txt: Regenerated.
	* config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt: Regenerated.

From-SVN: r199331
2013-05-25 23:02:54 +00:00
Paolo Carlini
7ad689673f re PR libstdc++/56678 ([c++11] non-uglified name in <chrono>)
2013-03-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/56678
	* include/std/chrono (__is_ratio): Uglify T.

From-SVN: r196954
2013-03-22 10:44:42 +00:00
Richard Sandiford
405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Jason Merrill
734f50238f * many: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
From-SVN: r193392
2012-11-10 12:27:22 -05:00
Benjamin Kosnik
a9ba8ba56c move.h (move_if_noexcept): Mark constexpr.
2012-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/move.h (move_if_noexcept): Mark constexpr.
	* include/std/array (front, back): Same.
	* include/std/chrono: Add comment.
	* include/std/tuple (__tuple_compare): Mark __eq, __less constexpr.
	(operator ==, <, >, !=, <=, >=): Same.
	* testsuite/20_util/forward/c_neg.cc: Adjust line numbers.
	* testsuite/20_util/forward/f_neg.cc: Same.
	* testsuite/20_util/move_if_noexcept/constexpr.cc: New.
	* testsuite/20_util/tuple/comparison_operators/constexpr.cc: New.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Add.
	* testsuite/23_containers/array/element_access/
	constexpr_element_access.cc: Same.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
	line numbers.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Same.

	* testsuite/20_util/tuple/comparison_operators/35480_neg.cc:
          Temporarily add dg-excess-errors.

From-SVN: r192556
2012-10-18 08:36:06 +00:00
Daniel Krugler
b3618b7167 type_traits (common_time): Provide "SFINAE-friendly" implementation.
2012-10-09  Daniel Krugler  <daniel.kruegler@googlemail.com>

	* include/std/type_traits (common_time): Provide "SFINAE-friendly"
	implementation.
	(__success_type, __failure_type): Fix.
	* include/std/chrono (common_type): Likewise for the chrono::time_point
	specialization.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: New.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
	Likewise.
	* testsuite/20_util/duration/requirements/sfinae_friendly_1.cc:
	Likewise.
	* testsuite/20_util/common_type/requirements/typedefs-1.cc: Adjust wrt
	LWG 2141.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	dg-error line numbers.
	* 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/declval/requirements/1_neg.cc: Likewise.

	* testsuite/20_util/result_of/sfinae_friendly_1.cc: Trivial stylistic
	tweaks.
	* testsuite/20_util/result_of/sfinae_friendly_2.cc: Likewise.

From-SVN: r192276
2012-10-09 22:31:44 +00:00
Jonathan Wakely
9ab48d6e6c acinclude.m4: Update references to final C++11 standard.
* acinclude.m4: Update references to final C++11 standard.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* include/std/chrono: Likewise.
	* include/std/thread: Likewise.

From-SVN: r190271
2012-08-09 23:45:20 +01:00
Chip Salzenberg
d069a690ee re PR libstdc++/54025 (atomic<chrono::duration> won't compile: chrono::duration::duration() is not C++11 compliant)
2012-07-20  Chip Salzenberg  <chip@pobox.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/54025
	* include/std/chrono (duration<>::duration): Fix per C++11.
	* testsuite/20_util/duration/cons/54025.cc: New.
	* testsuite/20_util/duration/cons/constexpr.cc: Adjust.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r189711
2012-07-20 09:48:57 +00:00
Paolo Carlini
c128d2031e re PR libstdc++/53840 ([C++11] DR 921. Rational Arithmetic should use template aliases)
2012-07-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/53840
	* include/std/ratio (ratio_multiply, ratio_divide, ratio_add,
	ratio_subtract): Use template aliases.
	* include/std/chrono (duration<>::duration(const duration<>&),
	duration_cast): Adjust.
	* testsuite/20_util/ratio/operations/53840.cc: New.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.

From-SVN: r189239
2012-07-03 19:24:07 +00:00
Paolo Carlini
8535715d0f re PR libstdc++/51438 (std::exception and derived classes are not compatible with std::nested_exception and C++11 in general)
2011-12-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51438
	* libsupc++/nested_exception.h (nested_exception::~nested_exception):
	Declare noexcept.
	* libsupc++/nested_exception.cc: Adjust.
	* testsuite/18_support/nested_exception/51438.cc: New.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc:
	Likewise.

	* src/shared_ptr.cc: Use noexcept where appropriate.
	* include/std/system_error: Likewise.
	* include/std/functional: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* src/stdexcept.cc: Use _GLIBCXX_USE_NOEXCEPT where appropriate.
	* include/std/stdexcept: Likewise.
	* libsupc++/bad_cast.cc: Likewise.
	* libsupc++/bad_typeid.cc: Likewise.
	* libsupc++/eh_exception.cc: Likewise.
	* libsupc++/typeinfo: Likewise.
	* libsupc++/exception: Likewise.
	* libsupc++/eh_ptr.cc: Likewise.
	* libsupc++/bad_alloc.cc: Likewise.
	* libsupc++/exception_ptr.h: Likewise.

	* include/std/chrono: Use noexcept where appropriate.
	* src/chrono.cc: Likewise.

From-SVN: r182064
2011-12-06 20:03:25 +00:00
Paolo Carlini
dbb45bf915 chrono (operator*(const _Rep1&, const duration<>&)): Fix order of template parameters per LWG 2004.
2011-08-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/chrono (operator*(const _Rep1&, const duration<>&)):
	Fix order of template parameters per LWG 2004.

From-SVN: r178374
2011-08-31 10:29:31 +00:00
Paolo Carlini
a4eeb82207 future: constexpr functions are implicitly inline.
2011-08-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/future: constexpr functions are implicitly inline.
	* include/std/chrono: Likewise.
	* include/std/complex: Likewise.
	* include/bits/move.h: Likewise.
	* include/bits/stl_pair.h: Likewise.

From-SVN: r177679
2011-08-11 17:53:05 +00:00
Benjamin Kosnik
1b97ec17bc chrono: (system_clock::is_steady): Update to N3291 from is_monotonic.
2011-07-20  Benjamin Kosnik  <bkoz@redhat.com>
	    Daniel Krugler  <daniel.kruegler@googlemail.com>

	* include/std/chrono: (system_clock::is_steady): Update to N3291
	from is_monotonic.
	(time_point): Add constexpr to nonmember arithmetic operators.
	* src/chrono.cc: Modify for above.
	* src/compatibility-c++0x.cc: Same.
	* testsuite/20_util/time_point/nonmember/constexpr.cc: New.
	* testsuite/20_util/time_point/1.cc: Modify.
	* testsuite/20_util/system_clock/constexpr_data.cc: Modify.
	* testsuite/20_util/system_clock/1.cc: Modify.
	* testsuite/20_util/monotonic_clock/constexpr_data.cc: Move to...
	* testsuite/20_util/steady_clock/constexpr_data.cc: ...here.
	* testsuite/30_threads/condition_variable/members/2.cc: Modify.
	* testsuite/30_threads/condition_variable_any/members/2.cc: Modify.

From-SVN: r176549
2011-07-21 03:27:51 +00:00
Paolo Carlini
545dc5e324 extptr_allocator.h: Include <ext/numeric_traits.h> instead of <limits>.
2011-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/extptr_allocator.h: Include <ext/numeric_traits.h>
	instead of <limits>.
	* include/bits/allocator.h: Likewise.

	* include/std/chrono (duration_values<>::min): Call lowest, not min.

From-SVN: r174805
2011-06-08 12:12:00 +00:00
Paolo Carlini
b850be9d50 re PR libstdc++/49151 ([C++0x][constexpr] chrono::duration has incorrect non-member operator semantics)
2011-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49151
	* include/std/chrono (operator+, operator-, operator*, operator/,
	operator&): Implement LWG 2020 [WP]; specify constexpr.
	* testsuite/20_util/duration/arithmetic/dr2020.cc: New.

From-SVN: r174150
2011-05-24 23:29:19 +00:00
Benjamin Kosnik
12ffa22844 PR libstdc++/36104 part four
2011-01-30  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/36104 part four
	* include/bits/c++config (_GLIBCXX_STD): Remove.
	(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
	(_GLIBCXX_P): Now _GLIBCXX_STD_A.
	(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
	 _GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
	(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
	 _GLIBCXX_INLINE_PROFILE): Remove.
	(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
	(_GLIBCXX_END_NAMESPACE): Remove.
	(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
	(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
	(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
	(_GLIBCXX_END_NAMESPACE_ALGO): Add.
	(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
	(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
	(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
	(_GLIBCXX_END_NAMESPACE_VERSION): Add.
	(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
	(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
	(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
	* include/*: Use new macros for namespace scope.
	* config/*: Same.
	* src/*: Same.

	* src/Makefile.am (sources): Remove debug_list.cc, add
	compatibility-debug_list-2.cc.
	(parallel_sources): Remove parallel_list.cc, add
	compatibility-parallel_list-2.cc.
	(compatibility-parallel_list-2.[o,lo]): New rule.
	* src/Makefile.in: Regenerate.
	* src/debug_list.cc: Remove.
	* src/parallel_list.cc: Remove.
	* src/compatibility-list-2.cc: New.
	* src/compatibility-debug_list-2.cc: New.
	* src/compatibility-parallel_list-2.cc: New.

	* doc/doxygen/user.cfg.in: Adjust macros.

	* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
	* testsuite/20_util/declval/requirements/1_neg.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/forward/c_neg.cc: Same.
	* testsuite/20_util/forward/f_neg.cc: Same.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/forward_list/capacity/1.cc: Same.
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Same.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Same.
	* testsuite/23_containers/list/capacity/29134.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
	* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
	* testsuite/25_algorithms/sort/35588.cc: Same.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
	* testsuite/ext/profile/profiler_algos.cc: Same.
	* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
	* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
	* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
	* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.

From-SVN: r169421
2011-01-30 22:39:36 +00:00
Benjamin Kosnik
6f0a975741 confdeps.png: Regenerate.
2011-01-18  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/images/confdeps.png: Regenerate.

	* include/std/chrono (duration): Mark copy constructor constexpr.
	* testsuite/20_util/duration/cons/constexpr.cc: Add test.

From-SVN: r168979
2011-01-19 02:17:35 +00:00
Benjamin Kosnik
85db9dcc30 chrono: Constexpr markup for is_monotonic.
2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/chrono: Constexpr markup for is_monotonic.
	* src/chrono.cc: Same.
	* testsuite/20_util/clocks/1.cc: Move...
	* testsuite/20_util/system_clock/1.cc: ...here.
	* testsuite/20_util/system_clock/constexpr_data.cc
	* testsuite/20_util/monotonic_clock/constexpr_data.cc

	* include/std/complex: Mark primary template constexpr.
	* testsuite/26_numerics/complex/cons/constexpr_primary.cc: Add.
	* testsuite/26_numerics/complex/complex_value.cc: Move...
	* testsuite/26_numerics/complex/dr387.cc: Move...
	* testsuite/26_numerics/complex/value_operations/1.cc: ... here.
	* testsuite/26_numerics/complex/value_operations/dr387.cc: ...here.
	* testsuite/26_numerics/complex/value_operations/constexpr.cc: New.

2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>
	    Jason Merrill  <jason@redhat.com>

	* testsuite/lib/libstdc++.exp: Use scanasm.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Add support for non-literal types.
	(constexpr_single_value_constructible): Same.
	* testsuite/20_util/enable_shared_from_this/cons/constexpr.cc:
	Remove xfail.
	* testsuite/20_util/shared_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/unique_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/weak_ptr/cons/constexpr.cc: Add.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line number.

2010-11-23  Benjamin Kosnik  <bkoz@redhat.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (shared_future): Default ctor constexpr.
	(future): Same.
	* testsuite/30_threads/shared_future/cons/constexpr.cc: New.
	* testsuite/30_threads/future/cons/constexpr.cc: New.


Co-Authored-By: Jason Merrill <jason@redhat.com>
Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r167099
2010-11-23 23:47:44 +00:00
Benjamin Kosnik
16684e9c0d chrono: Use typedefs.
2010-11-02  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/chrono: Use typedefs.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.

From-SVN: r166229
2010-11-03 01:59:07 +00:00
Paolo Carlini
53dc5044ed cinttypes: Remove, move contents to C++0x and TR1 headers.
2010-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/cinttypes: Remove, move contents to C++0x
	and TR1 headers.
	* include/tr1_impl/cstdlib: Likewise.
	* include/tr1_impl/cstdio: Likewise.
	* include/tr1_impl/cctype: Likewise.
	* include/tr1_impl/boost_sp_counted_base.h: Likewise.
	* include/tr1_impl/cmath: Likewise.
	* include/tr1_impl/cfenv: Likewise.
	* include/tr1_impl/utility: Likewise.
	* include/tr1_impl/complex: Likewise.
	* include/tr1_impl/cwchar: Likewise.
	* include/tr1_impl/type_traits: Likewise.
	* include/tr1_impl/cstdint: Likewise.
	* include/tr1_impl/regex: Likewise.
	* include/tr1_impl/array: Likewise.
	* include/tr1_impl/cwctype: Likewise.
	* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* src/condition_variable.cc: Adjust; consistently use
	_GLIBCXX_BEGIN_NAMESPACE and _GLIBCXX_END_NAMESPACE.
	* src/mutex.cc: Likewise.
	* src/future.cc: Likewise.
	* src/atomic.cc: Likewise.
	* src/chrono.cc: Likewise.
	* src/thread.cc: Likewise.
	* include/std/tuple: Likewise.
	* include/std/utility: Likewise.
	* include/std/thread: Likewise.: Likewise.
	* include/std/type_traits: Likewise.
	* include/std/memory: Likewise.
	* include/std/future: Likewise.
	* include/std/ratio: Likewise.
	* include/std/chrono: Likewise.
	* include/std/condition_variable: Likewise.
	* include/std/mutex: Likewise.
	* include/std/functional: Likewise.
	* include/std/complex: Likewise.
	* include/std/typeindex: Likewise.
	* include/std/array: Likewise.
	* include/bits/regex_compiler.h: Likewise.
	* include/bits/regex_grep_matcher.tcc: Likewise.
	* include/bits/regex_grep_matcher.h: Likewise.
	* include/bits/regex_constants.h: Likewise.
	* include/bits/regex_cursor.h: Likewise.
	* include/bits/regex_nfa.tcc: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/regex_nfa.h: Likewise.
	* include/bits/random.tcc: Likewise.
	* include/bits/regex.h: Likewise.
	* include/bits/random.h: Likewise.
	* include/bits/regex_error.h: Likewise.
	* include/c_global/cinttypes: Likewise.
	* include/c_global/cstdlib: Likewise.
	* include/c_global/cstdio: Likewise.
	* include/c_global/cctype: Likewise.
	* include/c_global/cmath: Likewise.
	* include/c_global/cfenv: Likewise.
	* include/c_global/cwchar: Likewise.
	* include/c_global/cstdint: Likewise.
	* include/c_global/cwctype: Likewise.
	* include/tr1/shared_ptr.h: Likewise.
	* include/tr1/cinttypes: Likewise.
	* include/tr1/cstdio: Likewise.
	* include/tr1/cfenv: Likewise.
	* include/tr1/utility: Likewise.
	* include/tr1/cwchar: Likewise.
	* include/tr1/type_traits: Likewise.
	* include/tr1/memory: Likewise.
	* include/tr1/cstdint: Likewise.
	* include/tr1/regex: Likewise.
	* include/tr1/cwctype: Likewise.
	* include/tr1/cstdlib: Likewise.
	* include/tr1/cctype: Likewise.
	* include/tr1/cmath: Likewise.
	* include/tr1/complex: Likewise.
	* include/tr1/array: Likewise.
	* include/c_compatibility/fenv.h: Likewise.
	* include/c_compatibility/stdint.h: Likewise.
	* include/c_compatibility/inttypes.h: Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc: Adjust
	dg-error line numbers.
	* 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/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/43820.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.

From-SVN: r166211
2010-11-02 18:51:23 +00:00
Benjamin Kosnik
94a86be0dd libstdc++: N3126 draft support.
* include/std/chrono: Extend constexpr application.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible, constexpr_single_value_constructible)
	: Add comments about implied constraints.
	* testsuite/20_util/duration/cons/constexpr.cc: Activate all tests.
	* testsuite/20_util/time_point/cons/constexpr.cc: Same.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc:
	Same.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust line
	numbers.
	* testsuite/20_util/time_point_cast/constexpr.cc: New.

	* include/std/bitset: Use __SIZEOF_* macros to re-create original
	logic instead of slipshod application of
	std::numeric_limits<T>::max() macros.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Modify.

	* include/std/chrono: Tested constexpr.
	* testsuite/20_util/duration_cast/constexpr.cc: New.
	* testsuite/20_util/time_point/cons/constexpr.cc: New.

	* testsuite/20_util/duration/cons/constexpr.cc: Add single_value tests.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/time_point/cons/constexpr.cc: Add single_value
	tests.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc: Add.

	* testsuite/util/testsuite_common_types.h: Adjust init.

	* include/std/chrono (duration): Remove defaulted constructor,
	replace with mem-init list.
	* testsuite/20_util/duration/cons/constexpr.cc: Add single value.
	* testsuite/20_util/duration/requirements/constexpr_functions.cc:
	Add non-static member functions.

	* testsuite/20_util/default_delete/cons/constexpr.cc: New, xfail.
	* testsuite/20_util/enable_shared_from_this/cons/constexpr.cc: Same.
	* testsuite/20_util/shared_ptr/cons/constexpr.cc: Same.
	* testsuite/20_util/time_point/requirements/constexpr_functions.cc:
	Same.
	* testsuite/20_util/unique_ptr/cons/constexpr.cc: Same.
	* testsuite/20_util/weak_ptr/cons/constexpr.cc: Same.

	* include/std/bitset: Add constexpr as per N3126 draft.
	* testsuite/23_containers/bitset/cons/constexpr.cc: New.
	* testsuite/23_containers/bitset/requirements/constexpr_functions.cc:
	New.

	* testsuite/util/testsuite_common_types.h: Reset condition.

	* include/bits/random.h: Remove misleading comments.
	* include/bits/regex.h: Add constexpr.
	* testsuite/28_regex/05_constants/syntax_option_type.cc: Add tests.
	* testsuite/28_regex/08_basic_regex/requirements/constexpr_data.cc: New.

	PR libstdc++/46134
	* include/std/chrono: Use default constructor.
	* testsuite/util/testsuite_common_types.h
	(constexpr_default_constructible): Adjust condition.

	PR libstdc++/46133
	* include/std/complex: Adjust complex specialization default
	constructors for constexpr.
	* testsuite/26_numerics/complex/cons/constexpr.cc: Enable tests.

	* include/bits/random.h: Adjust for constexpr as per N3126 draft.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/discard_block_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/independent_bits_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/linear_congruential_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/linear_congruential_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/mersenne_twister_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/mersenne_twister_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/shuffle_order_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/shuffle_order_engine/requirements/
	constexpr_functions.cc: New.
	* testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
	constexpr_data.cc: New.
	* testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
	constexpr_functions.cc: New.

	* include/bits/stream_iterator.h: Add constexpr as per N3126 draft.
	* include/bits/streambuf_iterator.h: Same.
	* include/std/complex: Same.
	* testsuite/24_iterators/istream_iterator/cons/constexpr.cc: New.
	* testsuite/24_iterators/istreambuf_iterator/cons/constexpr.cc: New.
	* testsuite/26_numerics/complex/cons/constexpr.cc: New.
	* testsuite/26_numerics/complex/requirements/constexpr_functions.cc:
	New.

	* include/bits/char_traits.h: Add constexpr as per N3126 draft.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions.cc:
	New.

	* include/tr1_impl/array: Add constexpr as per N3126 draft.
	* testsuite/23_containers/array/requirements/
	constexpr_functions.cc: New.

	* include/bits/shared_ptr.h: Revert changes.
	* include/bits/unique_ptr.h: Same.

	* include/std/chrono: Adjust.
	* include/tr1_impl/type_traits: Same.

	* testsuite/util/testsuite_common_types.h: Add test functors.
	* testsuite/20_util/duration/cons/constexpr.cc: New.
	* testsuite/20_util/duration/requirements/constexpr_functions.cc: Same.
	* testsuite/20_util/pair/cons/constexpr.cc: Same.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Same.
	* testsuite/27_io/ios_base/types/fmtflags/constexpr_operators.cc: Same.
	* testsuite/27_io/ios_base/types/iostate/constexpr_operators.cc: Same.
	* testsuite/27_io/ios_base/types/openmode/constexpr_operators.cc: Same.
	* testsuite/30_threads/call_once/constexpr.cc: Same.
	* testsuite/30_threads/mutex/cons/constexpr.cc: Same.
	* testsuite/30_threads/once_flag/cons/constexpr.cc: Same.
	* testsuite/tr1/4_metaprogramming/integral_constant/requirements/
	constexpr_data.cc: Same.

	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.

	* include/bits/allocator.h: Add constexpr as per N3126 draft.
	* include/bits/ios_base.h: Same.
	* include/bits/shared_ptr.h: Same.
	* include/bits/unique_ptr.h: Same.
	* include/bits/stl_iterator.h: Same.
	* include/bits/stl_pair.h: Same.
	* include/std/tuple: Same.
	* include/tr1_impl/type_traits: Same.
	* include/std/chrono: Same.
	* include/std/ratio: Same.
	* include/std/mutex: Same.
	* src/mutex.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

	* doc/doxygen/user.cfg.in: Replace _GLIBCXX_USE_CONSTEXPR,
	_GLIBCXX_CONSTEXPR for doxygen generation.

	* src/limits.cc: Undef.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Adjust.
	* testsuite/29_atomics/atomic_address/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.c: Same.
	* testsuite/18_support/numeric_limits/constexpr.cc: To...
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_data.cc, constexpr_functions.cc: ...this

	* testsuite/util/testsuite_common_types.h
	(constexpr_single_value_constructible): Add.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Adjust name.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_address/cons/constexpr.cc: New.
	* testsuite/18_support/numeric_limits/constexpr.cc: New.

	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust line numbers.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Same.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Same.

	* include/bits/c++config (_GLIBCXX_CONSTEXPR): Add.
	(_GLIBCXX_USE_CONSTEXPR): Add.
	* include/std/limits: Use it.
	* src/limits.cc: Adjust.
	* testsuite/ext/profile/mutex_extensions.cc: Change line number.

	* include/bits/atomic_0.h: Rework for N3126 draft, add constexpr.
	* include/bits/atomic_2.h: Same.
	* include/bits/atomic_base.h: Same.
	* include/std/atomic: Same.
	* src/atomic.cc: Same.
	* include/bits/atomicfwd_c.h: Remove.
	* include/bits/atomicfwd_cxx.h: Remove.
	* include/c_compatibility/stdatomic.h: Remove.
	* include/Makefile.am: Remove atomicfwd_c.h, atomicfwd_cxx.h,
	stdatomic.h.
	* include/Makefile.in: Regenerate.
	* doc/xml/manual/using.xml: Update list of header files for changes.
	* testsuite/util/testsuite_common_types.h
	(constexpr_constructible): Add.
	* testsuite/29_atomics/atomic/cons/constexpr.cc: New.
	* testsuite/29_atomics/atomic_integral/cons/constexpr.cc: New.
	* testsuite/17_intro/headers/c++200x/stdc++.cc: Modify.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_address/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/atomic_flag/cons/1.cc: Same.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
	* testsuite/29_atomics/headers/atomic/macros.cc: Same.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Same.
	* testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc: Same.
	* testsuite/29_atomics/atomic_flag/test_and_set/implicit.c: Remove.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit.c: Same.
	* testsuite/29_atomics/atomic_flag/clear/1.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/debug_mode.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/functions.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/macros.c: Same.
	* testsuite/29_atomics/headers/stdatomic.h/types.c: Same.

	* testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.16.

From-SVN: r166171
2010-11-01 22:35:28 -04:00
Paolo Carlini
ab65a4c7bd hashtable.h: Fold in include/tr1_impl/hashtable.h contents.
2010-02-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1/hashtable.h: Fold in include/tr1_impl/hashtable.h
	contents.
	* include/tr1_impl/hashtable.h: Remove.
	* include/tr1_impl/hashtable_policy.h: Move and rename...
	* include/tr1/hashtable_policy.h: ... here.
	* include/tr1_impl/unordered_map: Move and rename...
	* include/tr1/unordered_map.h: ... here.
	* include/tr1_impl/unordered_set: Move and rename...
	* include/tr1/unordered_set.h: ... here.
	* include/tr1_impl/unordered_map: Move and rename...
	* include/tr1/unordered_map.h: ... here.
	* include/tr1/unordered_map: Adjust.
	* include/tr1/unordered_set: Likewise.
	* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.

	* include/std/c++0x_warning.h: Move...
	* include/bits/c++0x_warning.h: ... here.
	* include/debug/unordered_map: Adjust.
	* include/debug/unordered_set: Likewise.
	* include/std/tuple: Likewise.
	* include/std/system_error: Likewise.
	* include/std/forward_list: Likewise.
	* include/std/thread: Likewise.
	* include/std/type_traits: Likewise.
	* include/std/future: Likewise.
	* include/std/regex: Likewise.
	* include/std/atomic: Likewise.
	* include/std/ratio: Likewise.
	* include/std/random: Likewise.
	* include/std/unordered_map: Likewise.
	* include/std/chrono: Likewise.: Likewise.
	* include/std/condition_variable: Likewise.
	* include/std/mutex: Likewise.
	* include/std/unordered_set: Likewise.
	* include/std/array: Likewise.
	* include/profile/unordered_map: Likewise.
	* include/profile/unordered_set: Likewise.
	* include/c_global/cinttypes: Likewise.
	* include/c_global/ctgmath: Likewise.
	* include/c_global/cfenv: Likewise.
	* include/c_global/cstdint: Likewise.
	* include/c_global/cstdbool: Likewise.
	* include/c_global/ccomplex: Likewise.

	* include/bits/shared_ptr.h: Do not include <bits/c++0x_warning.h>
	at all, the file is not meant to be included by the users.
	* include/bits/functional_hash.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* include/bits/forward_list.h: Likewise.

	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-*
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_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/20_util/unique_ptr/modifiers/reset_neg.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/assign_neg.cc: Likewise.

From-SVN: r156667
2010-02-10 19:14:33 +00:00
Paolo Carlini
cc1e250414 chrono (struct __common_rep_type): New.
2009-10-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/chrono (struct __common_rep_type): New.
	(duration_cast(const duration<>&),
	duration<>::duration(const _Rep2&),
	duration<>::duration(const duration<>&),
	operator*(const duration<>&, const _Rep2&),
	operator*(const _Rep1&, const duration<>&),
	operator/(const duration<>&, const _Rep2&),
	time_point_cast(const time_point<>&)): Implement resolution of
	DR 1177 ([Ready] in Santa Cruz), change to not participate to
	overload resolution if the constraints are not met. 
	* testsuite/20_util/duration/cons/1_neg.cc: Adjust dg-errors.
	* testsuite/20_util/duration/cons/dr974.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.

From-SVN: r153787
2009-11-01 00:35:40 +00:00
Paolo Carlini
9c67ec2204 chrono (duration<>::duration(const duration<>&)): Fix per the straightforward resolution of DR 974.
2009-10-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/chrono (duration<>::duration(const duration<>&)): Fix
	per the straightforward resolution of DR 974.
	* testsuite/20_util/duration/cons/dr974.cc: Add.

From-SVN: r153581
2009-10-27 01:18:10 +00:00
Paolo Carlini
513c5a5bd9 chrono (duration<>::operator%=, operator%): Add, per DR 934.
2009-07-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/chrono (duration<>::operator%=,  operator%):
	Add, per DR 934.
	* testsuite/20_util/duration/arithmetic/dr934-1.cc: New.
	* testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.

	* include/std/chrono (operator/): Simplify implementation.

From-SVN: r149856
2009-07-21 14:48:47 +00:00
Jan Hubicka
50a681c4ee condition_variable.cc (condition_variable, [...]): Mark throw()
* src/condition_variable.cc (condition_variable,
	condition_variable_any constructors): Mark throw()
	* src/hash.cc (operator() for long double, string, and wstring): Mark
	throw ().
	* src/strstream.cc (strstreambuf constructors, freeze, str, pcount,
	_M_setup, rdbuf, str): Mark throw ().
	* src/chrono.cc (new): Mark throw ().
	* include/std/system_error (system_category, generic_category): Mark
	throw () and const.
	* include/std/chrono (now): Mark throw ().
	* include/std/condition_variable (condition_variable,
	~condition_variable, condition_variable_any,
	~condition_variable_any): Mark throw ().
	* include/std/mutex (mutex): Mark throw ().
	* include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark
	throw.
	* include/bits/functional_hash.h (operator()  on size_t): Mark pure and throw ().
	* include/bits/locale_facets.tcc (__verify_grouping): Mark pure.
	* include/bits/locale_classes.h (_S_initialize_once,
	_S_clone_c_locale): Mark throw ().
	(_S_get_c_name): Mark const and throw ().
	(_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw ().
	* include/bits/locale_facets.h (__convert_to_v explicit instances):
	Mark throw ().
	(_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw ().
	* include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue,
	ios_base): Mark throw ()
	* include/bits/locale_facets_nonio.h (_M_put): Mark throw.
	* include/backward/strstream (strstreambuf constructors): Mark throw ().
	(str, freeze, _M_setupf): Mark throw ().
	(pcount): Mark pure and throw ().
	(rdbuf): Mark const and throw ().

From-SVN: r146328
2009-04-18 21:19:18 +00:00