Commit Graph

9775 Commits

Author SHA1 Message Date
François Dumont
fee84d551f 2017-05-11 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_tree.h [_GLIBCXX_INLINE_VERSION]
	(_Rb_tree_impl<>): Remove _Is_pod_comparator
	template parameter.

From-SVN: r247929
2017-05-11 20:30:44 +00:00
François Dumont
ea594612f0 2017-05-11 François Dumont <fdumont@gcc.gnu.org>
* include/debug/safe_container.h [_GLIBCXX_USE_CXX11_ABI]
	(_Safe_container<>): Remove _IsCxx11AllocatorAware template parameter.
	* include/debug/string: Adapt.

From-SVN: r247926
2017-05-11 20:03:47 +00:00
François Dumont
dc4dd7f63f 2017-05-11 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h [_GLIBCXX_INLINE_VERSION]
	(__gnu_debug::_Error_formatter::_Parameter::_M_print_field): Remove.
	(__gnu_debug::_Error_formatter::_Parameter::_M_print_description):
	Remove.
	(__gnu_debug::_Error_formatter::_M_format_word): Remove.
	(__gnu_debug::_Error_formatter::_M_print_word): Remove.
	(__gnu_debug::_Error_formatter::_M_print_string): Remove.
	(__gnu_debug::_Error_formatter::_M_get_max_length): Remove.
	* src/c++11/debug.cc: Adapt.
	* config/abi/pre/gnu-versioned-namespace.ver: Adapt.

From-SVN: r247925
2017-05-11 19:49:26 +00:00
Jonathan Wakely
395ec8f30c Fix ViewCVS URLs in libstdc++ manual
* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
	* doc/xml/manual/mt_allocator.xml: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r247911
2017-05-11 16:01:10 +01:00
Jonathan Wakely
f8cba3aaae PR libstdc++/80285 optimize std::make_shared for -fno-rtti
PR libstdc++/80285
	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Define
	function to get unique fake std::type_info reference.
	(_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Compare to
	_S_ti() fake reference.
	(__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Share
	single implementation with or without RTTI enable.
	[!__cpp_rtti]: Pass fake reference to _M_get_deleter.
	* testsuite/20_util/shared_ptr/creation/alloc.cc: Change expected
	allocation and deallocation counts.
	* testsuite/20_util/shared_ptr/creation/single_allocation.cc: New.
	* testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
	New.

From-SVN: r247905
2017-05-11 14:21:07 +01:00
François Dumont
87c7063d68 Bump version namespace.
2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

	Bump version namespace.
	* config/abi/pre/gnu-versioned-namespace.ver: Bump version namespace
	from __7 to __8. Bump GLIBCXX_7.0 to GLIBCXX_8.0.
	* acinclude.m4 (libtool_VERSION): Bump to 8:0:0.
	* include/bits/c++config: Adapt.
	* include/bits/regex.h: Adapt.
	* include/experimental/bits/fs_fwd.h: Adapt.
	* include/experimental/bits/lfts_config.h: Adapt.
	* include/std/variant: Adapt.
	* python/libstdcxx/v6/printers.py: Adapt.
	* testsuite/libstdc++-prettyprinters/48362.cc: Adapt.
	* include/bits/stl_tree.h (_Rb_tree_impl<>): Remove _Is_pod_comparator
	template parameter when version namespace is active.

From-SVN: r247858
2017-05-10 20:40:28 +00:00
François Dumont
e5795ce493 stl_algobase.h (std::__iter_swap<false>): Remove _GLIBCXX_MOVE usage.
2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_algobase.h (std::__iter_swap<false>): Remove
	_GLIBCXX_MOVE usage.

From-SVN: r247855
2017-05-10 20:05:26 +00:00
Jason Merrill
e91c2cac34 * testsuite/24_iterators/container_access.cc (test03): Make il3 static.
From-SVN: r247799
2017-05-09 11:11:19 -04:00
Jonathan Wakely
9057edd30c Tweak static assertions in std::optional
* include/std/optional: Use a separate static_assert per condition.
	* testsuite/20_util/optional/cons/value_neg.cc: Update dg-error line
	numbers.

From-SVN: r247748
2017-05-08 18:13:38 +01:00
Jonathan Wakely
6d430cbd12 Clarify mt_allocator documentation w.r.t deallocation
* doc/xml/manual/mt_allocator.xml: Clarify deallocation behaviour.
	* doc/html/*: Regenerate.

From-SVN: r247742
2017-05-08 16:09:08 +01:00
Hugo Beauzée-Luyssen
8a20a3c76f re PR bootstrap/69506 (check-in 232454 seems to cause problems with cygwin builds)
2017-05-02  Hugo Beauzée-Luyssen <hugo@beauzee.fr>

	PR libstdc++/69506
	* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r247502
2017-05-02 15:04:39 +00:00
François Dumont
30fc569c18 48362.cc: Replace a regexp-test by a note-test.
2017-04-29  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/libstdc++-prettyprinters/48362.cc: Replace a regexp-test
	by a note-test.

From-SVN: r247411
2017-04-29 19:35:28 +00:00
Jonathan Wakely
b26f45f069 PR libstdc++/80553 don't allow destroying non-destructible types
PR libstdc++/80553
	* include/bits/stl_construct.h (_Destroy, _Destroy_n): Add static
	assertions to ensure type is destructible.
	(destroy_at, destroy, destroy_n): Move from stl_uninitialized.h.
	* include/bits/stl_uninitialized.h (destroy_at, destroy, destroy_n):
	Move to stl_construct.h.
	* testsuite/20_util/specialized_algorithms/memory_management_tools/
	destroy_neg.cc: New test.
	* testsuite/23_containers/vector/cons/destructible_neg.cc: New test.

From-SVN: r247379
2017-04-28 13:56:53 +01:00
Jonathan Wakely
38233afdcf Remove superfluous "" in dg-error.
* testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc: Remove
	superfluous "" in dg-error.

From-SVN: r247378
2017-04-28 13:56:38 +01:00
Tom de Vries
f166beaf42 Remove superfluous '{ target *-*-* }' in dg-(error|warning|message|bogus)
find $(find -type d -name testsuite) -type f \
     | xargs sed -ri \
       's#(dg-(error|warning|message|bogus).*) \{ target \*-\*-\* \} \}#\1 }#'

2017-04-28  Tom de Vries  <tom@codesourcery.com>

	* g++.dg/parse/error2.C: Remove superfluous '{ target *-*-* }' in
	dg-(error|warning|message|bogus).
	* g++.dg/parse/parameter-declaration-1.C: Same.
	* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Same.
	* gcc.dg/Wpointer-sign-Wall.c: Same.
	* gcc.dg/Wpointer-sign-pedantic.c: Same.
	* gcc.dg/cpp/19990413-1.c: Same.
	* gcc.dg/dg-test-1.c: Same.
	* gcc.dg/empty-source-2.c: Same.
	* gcc.dg/empty-source-3.c: Same.
	* gcc.dg/format/c99-printf-1.c: Same.
	* gcc.dg/format/c99-scanf-1.c: Same.
	* gcc.dg/label-decl-2.c: Same.
	* gcc.dg/m-un-2.c: Same.
	* gcc.dg/uninit-pr20644-O0.c: Same.
	* gfortran.dg/pr70006.f90: Same.
	* obj-c++.dg/fsf-package-0.m: Same.

	* testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc: Remove
	superfluous '{ target *-*-* }' in dg-(error|warning|message|bogus).

From-SVN: r247364
2017-04-28 07:26:32 +00:00
Jonathan Wakely
4ca4927ac6 Remove reundant const-qualification from cast targets
* include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp
	(PB_DS_CLASS_C_DEC::end()): Remove redundant const in cast type.
	* testsuite/util/testsuite_rng.h (twister_rand_gen::get_prob()):
	Likewise.

From-SVN: r247346
2017-04-27 16:17:05 +01:00
Jonathan Wakely
9425300b41 Improve tests for vector and deque move-assignment
* testsuite/23_containers/deque/allocator/move_assign-2.cc: Improve
	comment. Ensure first test works because allocator type propagates and
	not because is_always_equal is true.
	* testsuite/23_containers/vector/52591.cc: Likewise. Restore original
	testcase that instantiates the move-assignment operator.

From-SVN: r247284
2017-04-26 20:25:30 +01:00
Jonathan Wakely
957221f551 PR libstdc++/80506 fix constant used in condition
PR libstdc++/80506
	* include/bits/random.tcc (gamma_distribution::operator()): Fix magic
	number used in loop condition.

From-SVN: r247099
2017-04-24 14:43:19 +01:00
Jonathan Wakely
6e2e575a03 PR libstdc++/80504 qualify calls to avoid ADL
PR libstdc++/80504
	* include/bits/refwrap.h (ref, cref): Qualify calls.
	* testsuite/20_util/reference_wrapper/80504.cc: New test.

From-SVN: r247094
2017-04-24 12:40:07 +01:00
Jonathan Wakely
71f257f78e PR libstdc++/80493 fix invalid exception specification
PR libstdc++/80493
	* include/experimental/optional (optional::swap): Fix exception
	specification.

From-SVN: r247093
2017-04-24 12:40:02 +01:00
Jonathan Wakely
946ecd6ab2 PR libstdc++/80316 make promise::set_value throw no_state error
PR libstdc++/80316
	* include/std/future (_State_baseV2::_Setter::operator()): Remove
	_S_check calls that are done after the pointer to the shared state is
	already dereferenced.
	(_State_baseV2::_Setter<_Res, void>): Define specialization for void
	as partial specialization so it can be defined within the definition
	of _State_baseV2.
	(_State_baseV2::__setter): Call _S_check.
	(_State_baseV2::__setter(promise<void>*)): Add overload for use by
	promise<void>::set_value and promise<void>::set_value_at_thread_exit.
	(promise<T>, promise<T&>, promise<void>): Make _State a friend.
	(_State_baseV2::_Setter<void, void>): Remove explicit specialization.
	(promise<void>::set_value, promise<void>::set_value_at_thread_exit):
	Use new __setter overload.
	* testsuite/30_threads/promise/members/at_thread_exit2.cc: New test.
	* testsuite/30_threads/promise/members/set_exception.cc: Test
	promise<T&> and promise<void> specializations.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	Test for no_state error condition.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.

From-SVN: r247064
2017-04-21 15:49:19 +01:00
Jonathan Wakely
a2c0a1942c Avoid deprecated warnings about std::auto_ptr in library headers
* include/backward/auto_ptr.h: Ignore deprecated warnings from use
	of auto_ptr.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc: Adjust
	dg-error lineno.
	* libstdc++-v3/testsuite/20_util/default_delete/void_neg.cc: Likewise.
	* libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc:
	Likewise.
	* libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc:
	Likewise.

From-SVN: r247063
2017-04-21 14:08:51 +01:00
Edward Smith-Rowland
4ba07ed462 PR libstdc++/68397 std::tr1::expint fails ... long double arguments.
2017-04-20  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR libstdc++/68397 std::tr1::expint fails ... long double arguments.
	* include/tr1/exp_integral.tcc: Increase iteration limits.
	* testsuite/tr1/5_numerical_facilities/special_functions/15_expint/
	pr68397.cc: New test.
	* testsuite/special_functions/14_expint/pr68397.cc: New test.

From-SVN: r247027
2017-04-20 15:41:59 +00:00
Jonathan Wakely
1b36f6036e PR79862 check macro for type aliases that depend on <stdint.h>
PR libstdc++/79862
	* include/std/atomic [!_GLIBCXX_USE_C99_STDINT_TR1] (atomic_int8_t)
	(atomic_uint8_t, atomic_int16_t, atomic_uint16_t, atomic_int32_t,
	(atomic_uint32_t, atomic_int64_t, atomic_uint64_t)
	(atomic_int_least8_t, atomic_uint_least8_t, atomic_int_least16_t)
	(atomic_uint_least16_t, atomic_int_least32_t, atomic_uint_least32_t)
	(atomic_int_least64_t, atomic_uint_least64_t, atomic_int_fast8_t)
	(atomic_uint_fast8_t, atomic_int_fast16_t, atomic_uint_fast16_t)
	(atomic_int_fast32_t, atomic_uint_fast32_t, atomic_int_fast64_t)
	(atomic_uint_fast64_t, atomic_intmax_t, atomic_uintmax_t): Don't
	define.

From-SVN: r247021
2017-04-20 14:04:28 +01:00
Jonathan Wakely
db7ab54fbf Rationalise ABI links in libstdc++ manual
* doc/xml/manual/abi.xml: Rephrase one of the references to the
	Itanium C++ ABI.
	* doc/xml/manual/test.xml: Document DejaGnu 1.5.3 requirement.
	* doc/html/*: Regenerate.

From-SVN: r247003
2017-04-19 17:49:21 +01:00
Jonathan Wakely
6a8446fa8b * libsupc++/new: Update comment on #endif directive.
From-SVN: r246999
2017-04-19 16:18:24 +01:00
Jonathan Wakely
6cff9199c1 PR libstdc++/80448 remove noexcept from defaulted functions
PR libstdc++/80448
	* include/experimental/bits/fs_dir.h (directory_iterator)
	(recursive_directory_iterator): Remove noexcept from defaulted
	constructors.

From-SVN: r246993
2017-04-19 12:03:43 +01:00
Jonathan Wakely
afa56c1751 PR libstdc++/80446 cope with libc defining __has_builtin
PR libstdc++/80446
	* include/std/type_traits (is_aggregate): Change __has_builtin checks.
	* libsupc++/new (launder): Likewise.

From-SVN: r246992
2017-04-19 11:49:12 +01:00
Jonathan Wakely
38d68cf0f5 Fix incorrect results from std::boyer_moore_searcher
* include/std/functional (default_searcher, __boyer_moore_array_base)
	(__is_std_equal_to, __boyer_moore_base_t, boyer_moore_searcher)
	(boyer_moore_horspool_searcher): Remove redundant namespace
	qualification.
	(default_searcher::operator()): Construct return value early and
	advance second member in-place.
	(boyer_moore_horspool_searcher::operator()): Increment random access
	iterator directly instead of using std::next.
	(boyer_moore_searcher::operator()): Fix return value.
	* testsuite/20_util/function_objects/searchers.cc: Check both parts
	of return values.

From-SVN: r246964
2017-04-18 12:08:00 +01:00
Gerald Pfeifer
5ee26fce81 faq.xml: Update reference link to C++ ABI for Itanium.
* doc/xml/faq.xml: Update reference link to C++ ABI for Itanium.
	* doc/xml/manual/abi.xml. Ditto (thrice).

From-SVN: r246860
2017-04-11 22:36:40 +00:00
Jonathan Wakely
b0dfb235e8 Remove duplicated entry in C++17 library status table
* doc/xml/manual/status_cxx2017.xml: Remove duplicate table entry.
	* doc/html/*: Regenerate.

From-SVN: r246661
2017-04-03 19:58:32 +01:00
Jonathan Wakely
b1e282ca18 Uncomment std::reference_wrapper tests that no longer fail
* testsuite/20_util/reference_wrapper/invoke.cc: Uncomment tests
	that no longer fail.

From-SVN: r246658
2017-04-03 18:16:11 +01:00
Jonathan Wakely
59c06f4d56 Fix comments in libstdc++ header and test
* include/bits/ios_base.h: Correct comment.
	* testsuite/util/testsuite_hooks.h: Likewise.

From-SVN: r246657
2017-04-03 18:16:06 +01:00
Jonathan Wakely
9d83c64b16 Update C++17 library status table in manual
* doc/xml/manual/status_cxx2017.xml: Update C++17 status table.
	* doc/xml/manual/appendix_contributing.xml (contrib.organization): Add
	directories for debug, parallel and profile headers.
	* doc/html/*: Regenerate.

From-SVN: r246656
2017-04-03 18:16:01 +01:00
Jonathan Wakely
8c3b5c719f Implement P0426R1 "Constexpr for std::char_traits" for C++17 (partial)
* include/bits/char_traits.h (__gnu_cxx::char_traits): Add
	_GLIBCXX14_CONSTEXPR on assign, compare, find, and length.
	(std::char_traits<char>, std::char_traits<wchar_t>): Add
	_GLIBCXX17_CONSTEXPR on assign.
	(std::char_traits<char16_t>, std::char_traits<char32_t>): Add
	_GLIBCXX17_CONSTEXPR on assign, compare, find, and length.
	* testsuite/21_strings/char_traits/requirements/
	constexpr_functions_c++17.cc: New test.

From-SVN: r246655
2017-04-03 18:15:53 +01:00
Ville Voutilainen
c1e2889a32 re PR libstdc++/79141 (std::pair<int,int> p = {}; fails to compile due to ambiguous overload)
PR libstdc++/79141
* include/bits/stl_pair.h (__nonesuch_no_braces): New.
(operator=(typename conditional<
__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>::value,
const pair&, const __nonesuch&>::type)): Change __nonesuch
to __nonesuch_no_braces.
(operator=(typename conditional<
__not_<__and_<is_copy_assignable<_T1>,
is_copy_assignable<_T2>>>::value,
const pair&, const __nonesuch&>::type)): Likewise.
(operator=(typename conditional<
__and_<is_move_assignable<_T1>,
is_move_assignable<_T2>>::value,
pair&&, __nonesuch&&>::type)): Likewise.
* testsuite/20_util/pair/79141.cc: New.

From-SVN: r246653
2017-04-03 19:30:58 +03:00
Ville Voutilainen
e2ac6765db Implement std::is_aggregate.
* include/std/type_traits (is_aggregate, is_aggregate_v): New.
* testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
New.
* testsuite/20_util/is_aggregate/requirements/typedefs.cc: Likewise.
* testsuite/20_util/is_aggregate/value.cc: Likewise.

From-SVN: r246651
2017-04-03 18:57:06 +03:00
Ville Voutilainen
0000fd8cfd Adjust optional's pretty printer for LWG 2900.
* python/libstdcxx/v6/printers.py (StdExpOptionalPrinter.__init__):
Look at the nested payload in case of non-experimental optional.

From-SVN: r246566
2017-03-29 15:05:50 +03:00
Ville Voutilainen
250f5b6cc1 Implement LWG 2900, The copy and move constructors of optional are not constexpr.
Implement LWG 2900, The copy and move constructors
of optional are not constexpr.
* include/std/optional (_Optional_payload): New.
(_Optional_base): Remove the bool parameter.
(_Optional_base<_Tp, false>): Remove.
(_Optional_base()): Adjust.
(_Optional_base(nullopt_t)): Likewise.
(_Optional_base(in_place_t, _Args&&...)): Likewise.
(_Optional_base(in_place_t, initializer_list<_Up>, _Args&&...)):
Likewise.
(_Optional_base(const _Optional_base&)): Likewise.
(_Optional_base(_Optional_base&&)): Likewise.
(operator=(const _Optional_base&)): Likewise.
(operator=(_Optional_base&&)): Likewise.
(~_Optional_base()): Remove.
(_M_is_engaged()): Adjust.
(_M_get()): Likewise.
(_M_construct(_Args&&...)): Likewise.
(_M_destruct()): Likewise.
(_M_reset()): Likewise.
(_Optional_base::_Empty_byte): Remove.
(_Optional_base::_M_empty): Remove.
(_Optional_base::_M_payload): Adjust.
* testsuite/20_util/optional/cons/value_neg.cc: Adjust.
* testsuite/20_util/optional/constexpr/cons/value.cc: Add tests.

From-SVN: r246556
2017-03-29 02:05:21 +03:00
Jonathan Wakely
92d85953a5 PR libstdc++/80137 use std::nextafter instead of looping
PR libstdc++/80137
	* include/bits/random.tcc (generate_canonical): Use std::nextafter
	or numeric_limits::epsilon() to reduce out-of-range values.
	* testsuite/26_numerics/random/uniform_real_distribution/operators/
	64351.cc: Verify complexity requirement is met.

From-SVN: r246542
2017-03-28 17:09:49 +01:00
Jonathan Wakely
a138d52a9b Add _GLIBCXX_RELEASE macro to "Using" section of manual
* doc/xml/manual/abi.xml: Add xml:id anchor.
	* doc/xml/manual/using.xml (manual.intro.using.macros): Document
	_GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes.
	(concurrency.io.structure): Add markup.
	* doc/html/*: Regenerate.

From-SVN: r246532
2017-03-28 13:43:06 +01:00
Jonathan Wakely
b1bd915843 PR libstdc++/80229 restore support for shared_ptr<function type>
PR libstdc++/80229
	* include/bits/shared_ptr_base.h
	(__shared_ptr::_M_enable_shared_from_this_with): Change parameters to
	non-const and then use remove_cv to get unqualified type.
	* testsuite/20_util/enable_shared_from_this/members/const.cc: Don't
	cast away constness on object created const.
	* testsuite/20_util/shared_ptr/cons/80229.cc: New test.

From-SVN: r246520
2017-03-28 08:35:04 +01:00
Markus Trippelsdorf
4f28d159c5 Fix PR80183 : _M_color not moved
PR libstdc++/80183
	* include/bits/stl_tree.h:
	(_Rb_tree_header::_M_move_data(_Rb_tree_header&)): Also save _M_color.

From-SVN: r246483
2017-03-26 12:33:35 +00:00
Jonathan Wakely
01e3c2296a Fix Debug Mode test failures
* testsuite/23_containers/array/tuple_interface/
	tuple_element_debug_neg.cc: Adjust dg-error.
	* testsuite/23_containers/list/operations/78389.cc: Fix less-than to
	define a valid strict weak ordering.
	* testsuite/23_containers/priority_queue/67085.cc: Disable test for
	Debug Mode, due to debug checks making extra copies of predicate.
	* testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc:
	Likewise.

From-SVN: r246426
2017-03-23 19:40:41 +00:00
Jonathan Wakely
393ed575c4 Fix broken links in manual and remove outdated info
* doc/xml/faq.xml: Add link.
	* doc/xml/manual/backwards_compatibility.xml: Remove outdated
	information on pre-ISO headers. Replace broken link to C++ FAQ Lite.
	* doc/xml/manual/io.xml: Update broken link.
	* doc/html/*: Regenerate.

From-SVN: r246425
2017-03-23 19:40:21 +00:00
Daniel Kruegler
7f359d19d0 Implement LWG 2686, std::hash<error_condition>, for C++17
2017-03-23  Daniel Kruegler  <daniel.kruegler@gmail.com>

	Implement LWG 2686, Why is std::hash specialized for error_code,
	but not error_condition?
	* include/std/system_error (hash<error_condition>): Define for C++17.
	* testsuite/20_util/hash/operators/size_t.cc (hash<error_condition>):
	Instantiate test for error_condition.
	* testsuite/20_util/hash/requirements/explicit_instantiation.cc
	(hash<error_condition>): Instantiate hash<error_condition>.

From-SVN: r246424
2017-03-23 19:40:16 +00: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
Jonathan Wakely
af181c91a9 Add deduction guides for C++17 (P0433R2, partial)
* include/bits/shared_ptr.h (shared_ptr, weak_ptr): Add deduction
	guides for C++17.
	* include/bits/std_function.h (function): Likewise.
	* include/bits/stl_pair.h (pair): Likewise.
	* include/debug/array (__gnu_debug::array): Likewise.
	* include/std/array (array): Likewise.
	* include/std/functional (make_default_searcher)
	(make_boyer_moore_searcher, make_boyer_moore_horspool_searcher):
	Remove generator functions.
	* include/std/tuple (tuple): Add deduction guides.
	* include/std/valarray (valarray): Likewise.
	* testsuite/20_util/function_objects/searchers.cc: Adjust to use
	class template argument deduction instead of generator functions.
	* testsuite/20_util/function/cons/deduction.cc: New test.
	* testsuite/20_util/optional/cons/deduction_guide.cc: Rename to ...
	* testsuite/20_util/optional/cons/deduction.cc: ... here.
	* testsuite/20_util/pair/cons/deduction.cc: New test.
	* testsuite/20_util/shared_ptr/cons/deduction.cc: New test.
	* testsuite/20_util/tuple/cons/deduction.cc: New test.
	* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust dg-error.
	* testsuite/20_util/unique_ptr/cons/deduction_neg.cc: New test.
	* testsuite/20_util/weak_ptr/cons/deduction.cc: New test.
	* testsuite/23_containers/array/cons/deduction.cc: New test.
	* testsuite/23_containers/array/cons/deduction_neg.cc: New test.
	* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
	Adjust dg-error.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Likewise.
	* testsuite/26_numerics/valarray/deduction.cc: New test.
	* testsuite/30_threads/lock_guard/cons/deduction.cc: New test.
	* testsuite/30_threads/scoped_lock/cons/deduction.cc: New test.
	* testsuite/30_threads/unique_lock/cons/deduction.cc: New test.

From-SVN: r246389
2017-03-22 15:58:35 +00:00
François Dumont
fe62dd045e stl_deque.h (deque): Access allocator value_type only if concept checks are enabled.
2017-03-20  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_deque.h (deque): Access allocator value_type only if
	concept checks are enabled.
	* include/bits/stl_stack.h (stack): Likewise.
	* include/bits/stl_vector.h (vector): Likewise.
	* include/bits/stl_list.h (list): Likewise and check
	_SGIAssignableConcept only in C++03.
	* include/bits/stl_map.h (map): Likewise.
	* include/bits/stl_set.h (set): Likewise.
	* include/bits/stl_multimap.h (multimap): Likewise.
	* include/bits/stl_multiset.h (multiset): Likewise.
	* include/bits/stl_queue.h (queue, priority_queue): Likewise.

From-SVN: r246294
2017-03-20 20:51:40 +00:00
Gerald Pfeifer
e76659d189 appendix_contributing.xml: Convert link to ansi.org to https.
* doc/xml/manual/appendix_contributing.xml: Convert link to
	ansi.org to https.
	Update link to the C++ standard at ansi.org.

	* doc/xml/faq.xml: Remove information redundant with the above;
	instead add a reference.

From-SVN: r246259
2017-03-18 18:39:54 +00:00