2022-04-21  Release Manager

	* GCC 11.3.0 released.

2022-04-14  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/status_cxx1998.xml: Refer to GCC 11 not
	mainline.
	* doc/xml/manual/status_cxx2011.xml: Likewise.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/xml/manual/status_cxx2020.xml: Likewise.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
	* doc/html/manual/status.html: Regenerate.

2022-04-14  Iain Sandoe  <iain@sandoe.co.uk>

	Backported from master:
	2021-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	* testsuite/lib/prune.exp: Prune dsymutil (ld64) warning.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-27  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/100516
	* include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
	Add __builtin_unreachable to loop.
	* testsuite/23_containers/deque/100516.cc: New test.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-12-09  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103630
	* libsupc++/exception_ptr.h (exception_ptr): Fix exception
	specifications on inline definitions.
	(make_exception_ptr): Decay the template parameter. Use typeid
	of the static type.
	* testsuite/18_support/exception_ptr/103630.cc: New test.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-03-23  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/105021
	* include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
	<bits/atomic_wait.h> for freestanding.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-12-10  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103638
	* include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS
	before using std::mutex and std::__condvar.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-04  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/variant (__detail::__variant::__as): Add missing
	noexcept to first overload.

2022-04-12  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-01  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/90943
	* include/std/variant (__cpp_lib_variant): Update value.
	(__detail::__variant::__as): New helpers implementing the
	as-variant exposition-only function templates.
	(visit, visit<R>): Use __as to upcast the variant parameters.
	* include/std/version (__cpp_lib_variant): Update value.
	* testsuite/20_util/variant/visit_inherited.cc: New test.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2022-01-12  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/103955
	* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
	Track the excess precision separately from the effective
	precision.  Avoid overflow in bounds check by splitting it into
	two checks.
	(__floating_to_chars_precision): Avoid overflow in bounds checks
	similarly.
	* testsuite/20_util/to_chars/103955.cc: New test.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-21  Patrick Palka  <ppalka@redhat.com>

	* include/bits/stl_iterator.h (common_iterator::__arrow_proxy):
	Make fully constexpr as per LWG 3595.
	(common_iterator::__postfix_proxy): Likewise.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-21  Patrick Palka  <ppalka@redhat.com>

	* include/std/ranges (split_view::base): Add forward_range
	constraint as per LWG 3591.
	(split_view::begin, lazy_split_view::end): Also check
	simpleness of _Pattern as per LWG 3592.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-21  Patrick Palka  <ppalka@redhat.com>

	* include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust
	criteria for returning bidirectional_iterator_tag as per LWG 3535.
	(join_view::_Iterator::_S_iter_concept): Likewise.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-21  Patrick Palka  <ppalka@redhat.com>

	* include/bits/ranges_base.h (viewable_range): Adjust as per
	LWG 3481.
	* testsuite/std/ranges/adaptors/all.cc (test07): New test.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-19  Patrick Palka  <ppalka@redhat.com>

	* include/std/ranges (iota_view::_Iterator::operator+): Adjust
	definition as per LWG 3580.
	(iota_view::_Iterator::operator-): Likewise.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-19  Patrick Palka  <ppalka@redhat.com>

	* include/bits/ranges_util.h
	(__detail::__uses_nonqualification_pointer_conversion): Define
	and use it ...
	(__detail::__convertible_to_nonslicing): ... here, as per LWG 3470.
	* testsuite/std/ranges/subrange/1.cc: New test.

2022-04-12  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-19  Patrick Palka  <ppalka@redhat.com>

	* include/std/ranges (iota_view::_Iterator): Befriend iota_view.
	(iota_view::_Sentinel): Likewise.
	(iota_view::iota_view): Add three overloads, each taking an
	iterator/sentinel pair as per LWG 3523.
	* testsuite/std/ranges/iota/iota_view.cc (test06): New test.

2022-04-07  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2022-03-09  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/104859
	* src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
	Be explicit when narrowing the shifted effective_mantissa,
	since it may have an integer-class type.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-17  Jonathan Wakely  <jwakely@redhat.com>

	* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
	code that call cat->name() on std::error_category objects.
	Identify known categories by symbol name and use a hardcoded
	name. Print error code values as enumerators where appopriate.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
	name of custom category. Check io_errc and future_errc errors.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-03-23  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/105027
	* include/std/bit (bit_cast): Add constraints.
	* testsuite/26_numerics/bit/bit.cast/105027.cc: New test.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-04-01  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/bits/fs_fwd.h (copy_file): Remove
	incorrect noexcept from declaration.
	* include/experimental/bits/fs_path.h (path::begin, path::end):
	Add noexcept to declarations, to match definitions.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-08  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/experimental/filesystem/operations/create_directories.cc:
	Adjust expected results for Windows.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-02  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
	autoconf macro to check whether d_type is present.
	* testsuite/experimental/filesystem/iterators/error_reporting.cc:
	Likewise.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-01  Jonathan Wakely  <jwakely@redhat.com>

	* src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
	Reset state to past-the-end iterator on error.
	(fs::recursive_directory_iterator::pop(error_code&)): Likewise.
	(fs::recursive_directory_iterator::pop()): Check _M_dirs before
	it might get reset.
	* src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
	for the TS implementation.
	* testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
	* testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
	Use std::_Construct for construct.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-04  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/bits/fs_ops.h (fs::copy_file): Remove
	noexcept.
	(fs::create_directories): Likewise.
	(fs::remove_all): Likewise.
	* src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
	(fs::create_directories): Likewise.
	(fs::remove_all): Likewise.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-01  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/fs_fwd.h (filesystem::perms): Fix comment.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-17  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103650
	* include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
	* include/Makefile.in: Regenerate.
	* testsuite/17_intro/headers/c++1998/103650.cc: New test.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/104098
	* include/bits/stl_iterator.h (reverse_iterator): Check
	__cpp_lib_concepts instead of __cplusplus.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-19  Jonathan Wakely  <jwakely@redhat.com>

	* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
	from default flags.
	* configure: Regenerate.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-17  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/status_cxx2020.xml: Use final C++20 option
	names.
	* doc/html/manual/status.html: Regenerate.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-04  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/allocator.h: Qualify std::allocator_traits in
	deprecated warnings.
	* libsupc++/exception (uncaught_exception): Add suggestion to
	deprecated warning.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-15  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/104542
	* include/bits/uses_allocator_args.h (make_obj_using_allocator)
	(uninitialized_construct_using_allocator): Add constexpr.
	* testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
	* testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.

2022-04-04  Timm Bäder  <tbaeder@redhat.com>

	Backported from master:
	2022-04-01  Timm Bäder  <tbaeder@redhat.com>

	* include/bits/fs_ops.h: Fix filename in Doxygen comment.
	* include/experimental/bits/fs_ops.h: Likewise.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-03-08  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/uses_allocator_args.h: Remove incorrect copyright
	notice.

2022-04-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-02-01  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/104301
	* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
	for stdio_pure and stdio_posix options.
	* configure: Regenerate.

2022-02-17  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-10-21  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/102358
	* include/bits/stl_iterator.h (__niter_base): Make constexpr
	for C++20.
	(__miter_base): Likewise.
	* testsuite/25_algorithms/move/constexpr.cc: New test.

2022-02-11  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/103904
	* include/std/ranges (__detail::__box): Revert r11-9555 changes
	to the constraints on the partial specialization and the
	now-unnecessary special member functions.
	(__detail::__non_propagating_cache::operator=): Remove
	now-unused overload added by r11-9555.
	(split_view::_OuterIter::__current): Adjust after reverting the
	r11-9555 change to the type of _M_current.
	(split_view::_M_current): Revert r11-9555 change to its type.
	(split_view::split_view): Constrain the default constructor
	further.
	* testsuite/std/ranges/adaptors/detail/copyable_box.cc: Disable
	now-irrelevant test for the r11-9555 changes to the partial
	specialization of __box.

2022-02-11  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-07-16  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/103904
	PR libstdc++/101231
	* include/std/ranges (_CachedPosition::_M_get): For non-forward
	ranges, just call __builtin_unreachable.
	* testsuite/std/ranges/istream_view.cc (test05): New test.

2022-02-11  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-06-21  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/103904
	* include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.

2022-02-11  Patrick Palka  <ppalka@redhat.com>

	Backported from master:
	2021-06-18  Patrick Palka  <ppalka@redhat.com>

	PR libstdc++/103904
	* include/bits/iterator_concepts.h (weakly_incrementable): Remove
	default_initializable requirement.
	* include/bits/ranges_base.h (ranges::view): Likewise.
	* include/bits/ranges_util.h (subrange): Constrain the default
	ctor.
	* include/bits/stl_iterator.h (common_iterator): Constrain the
	default ctor.
	(counted_iterator): Likewise.
	* include/std/ranges (__detail::__box::operator=): Handle
	self-assignment in the primary template.
	(__detail::__box): In the partial specialization: adjust
	constraints as per P2325.  Add specialized operator= for the
	case when the wrapped type is not copyable.  Constrain the
	default ctor.  Avoid list-initialization.
	(single_view): Constraint the default ctor.
	(iota_view): Relax semiregular constraint to copyable.
	Constrain the default ctor.
	(iota_view::_Iterator): Constraint the default ctor.
	(ref_view): Remove the default ctor.  Remove NSDMIs.
	(ref_view::_Iterator): Constrain the default ctor.
	(__detail::__non_propagating_cache::operator=): Define overload
	for assigning from a value of the underlying type.
	(filter_view): Likewise.
	(filter_view::_Iterator): Likewise.
	(transform_view): Likewise.
	(transform_view::_Iterator): Likewise.
	(take_view): Likewise.
	(take_view::_Iterator): Likewise.
	(take_while_view): Likewise.
	(take_while_view::_Iterator): Likewise.
	(drop_while_view): Likewise.
	(drop_while_view::_Iterator): Likewise.
	(join_view): Likewise.
	(split_view::_OuterIter::__current): Adjust after changing the
	type of _M_current.
	(split_view::_M_current): Wrap it in a __non_propagating_cache.
	(split_view::split_view): Constrain the default ctor.
	(common_view): Constrain the default ctor.
	(reverse_view): Likewise.
	(elements_view): Likewise.
	* include/std/span (enable_view<span<_ElementType, _Extent>>):
	Define this partial specialization to true unconditionally.
	* include/std/version (__cpp_lib_ranges): Adjust value.
	* testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
	Rename to ...
	* testsuite/std/ranges/adaptors/detail/copyable_box.cc: ... this.
	(test02): Adjust now that __box is copyable-box not
	semiregular-box.
	(test03): New test.
	* testsuite/std/ranges/p2325.cc: New test.
	* testsuite/std/ranges/single_view.cc (test06): New test.
	* testsuite/std/ranges/view.cc: Adjust now that view doesn't
	require default_initializable.

2022-02-10  Thomas Rodgers  <rodgert@appliantology.com>

	Backported from master:
	2022-02-10  Thomas Rodgers  <rodgert@appliantology.com>

	* include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
	__waiter_base::_S_do_spin_v): Change memory order from relaxed
	to acquire.

2022-02-09  Thomas Rodgers  <rodgert@appliantology.com>

	Backported from master:
	2022-02-09  Thomas Rodgers  <rodgert@appliantology.com>

	PR libstdc++/104442
	* include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
	 loop inside do loop so that threads failing the wait, reload
	 _M_ver.

2022-02-01  Thomas Rodgers  <rodgert@appliantology.com>

	Backported from master:
	2022-02-01  Thomas Rodgers  <rodgert@appliantology.com>

	* include/bits/atomic_wait.h: Change memory order from
	Acquire/Release with relaxed loads to SeqCst+Release for
	accesses to the waiter's count.

2022-01-10  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-10  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/using.xml: Update documentation around default
	-std option.
	* doc/html/*: Regenerate.

2022-01-10  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-10  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/100017
	* src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
	* src/c++17/Makefile.in: Regenerate.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-18  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
	Do not compare unrelated pointers during constant evaluation.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
	Improve tests for char_traits::move.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-12-10  Jonathan Wakely  <jwakely@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add _GLIBCXX_
	prefix to NO_SLEEP macro.
	* config.h.in: Regenerate.
	* configure: Regenerate.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103877
	* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
	* doc/html/faq.html: Regenerate.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-12-01  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103501
	* include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&, false_type)):
	Clear container if elements have been moved-from.
	* testsuite/23_containers/map/allocator/move_cons.cc: Expect
	moved-from container to be empty.
	* testsuite/23_containers/multimap/allocator/move_cons.cc:
	Likewise.
	* testsuite/23_containers/multiset/allocator/103501.cc: New test.
	* testsuite/23_containers/set/allocator/103501.cc: New test.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-12-04  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103549
	* include/bits/regex.h (match_results): Give names to template
	parameters in first declaration.
	(match_results::_M_begin): Add default member-initializer.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-30  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103453
	* config/allocator/malloc_allocator_base.h
	(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
	* config/allocator/new_allocator_base.h
	(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/103919
	* include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
	Relax constraints on string_view parameter.
	[!_GLIBCXX_USE_CXX11_ABI] (basic_string(const T&, size_t, size_t)):
	Likewise.
	* testsuite/21_strings/basic_string/cons/char/103919.cc: New test.

2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2022-01-05  Jonathan Wakely  <jwakely@redhat.com>

	* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
	versioned namespace from the type name that is printed.

2022-01-04  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-28  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/alloc_traits.h (allocator_traits): Add explicit
	specialization for allocator<void>. Improve doxygen comments.
	* include/bits/allocator.h (allocator<void>): Restore for the
	versioned namespace.
	(allocator<void>::construct, allocator<void>::destroy): Remove.
	* include/ext/extptr_allocator.h (_Extptr_allocator<void>):
	Add default constructor and converting constructor.

2021-12-10  Thomas Rodgers  <rodgert@twrodgers.com>

	Backported from master:
	2021-12-10  Thomas Rodgers  <rodgert@twrodgers.com>

	PR libstdc++/102994
	* include/bits/atomic_base.h (__atomic_base<_PTp*>::wait()):
	Add const qualifier.
	* include/std/atomic (atomic<_Tp*>::wait(), atomic_wait()):
	Likewise.
	* testsuite/29_atomics/atomic/wait_notify/102994.cc:
	New test.

2021-11-26  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-26  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/29_atomics/atomic_float/1.cc: Reorder directives.

2021-11-26  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-26  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
	Change dg-do compile to run.
	* testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
	Likewise.

2021-11-26  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/96416
	* include/bits/ptr_traits.h (pointer_traits): Remove
	static_assert checking for valid element_type.
	(pointer_traits::element_type, pointer_traits::pointer_to):
	Do not define when element type cannot be deduced.
	* testsuite/20_util/pointer_traits/lwg3545.cc: New test.
	* testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line.
	* testsuite/20_util/to_address/lwg3545.cc: New test.

2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/101608
	* include/bits/ranges_algobase.h (__fill_n_fn): Check for
	constant evaluation before using memset.
	* testsuite/25_algorithms/fill_n/constrained.cc: Check
	byte-sized values as well.

2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-18  Jonathan Wakely  <jwakely@redhat.com>

	* python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Use
	'std::vector<bool>::reference' as type name, not _Bit_reference.
	(build_libstdcxx_dictionary): Register printers for vector<bool>
	types in debug mode too.
	* testsuite/libstdc++-prettyprinters/simple.cc: Adjust expected
	output for invalid _Bit_reference. Use vector<bool>::reference
	instead of _Bit_reference.
	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.

2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
	debug mode.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.

2021-11-25  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/lib/libstdc++.exp: Rename effective target keywords
	to avoid dashes in the name.
	* testsuite/*: Update effective targe keywords.

2021-11-24  François Dumont  <fdumont@gcc.gnu.org>

	Backported from master:
	2021-08-08  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Replace 'failed_assertion'
	dg-prune-output reason with 'builtin_unreachable'.
	* testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: Likewise.
	* testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
	* testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
	* testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: Likewise.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-09  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/23_containers/unordered_map/cons/default.cc: Add
	equality comparison operators to allocator.
	* testsuite/23_containers/unordered_set/cons/default.cc:
	Likewise.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-05  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/utility (__is_in_place_type_v): Define
	variable template to detect in_place_type_t specializations.
	(__is_in_place_type): Replace class template with alias
	template using __is_in_place_type_v.
	* include/std/any (any(T&&)): Check __is_in_place_type first and
	avoid instantiating is_copy_constructible unnecessarily.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-21  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/alloc_traits.h: Suppress doxygen documentation.
	* include/bits/allocated_ptr.h: Likewise.
	* include/bits/enable_special_members.h: Likewise.
	* include/bits/hashtable.h: Likewise.
	* include/bits/hashtable_policy.h: Likewise.
	* include/bits/uses_allocator.h: Likewise.
	* include/bits/node_handle.h: Document node handles and suppress
	documentation for protected members.
	* include/std/any: Suppress documentation for implementation
	details.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-10  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/100748
	PR libstdc++/103133
	* config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
	Define for glibc 2.34 and later.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-09  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/26_numerics/random/random_device/cons/token.cc:
	Print results of random_device_available checks.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-09  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/26_numerics/random/random_device/cons/token.cc:
	Retry if random devices produce the same value.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-14  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/stl_construct.h (_Construct): Use
	std::construct_at when constant evaluated.
	* include/std/optional (_Storage, _Optional_payload, optional):
	Add constexpr as specified by P2231R1.
	* include/std/version (__cpp_lib_optional): Update value for
	C++20.
	* testsuite/20_util/optional/requirements.cc: Check feature test
	macro.
	* testsuite/20_util/optional/constexpr/assign.cc: New test.
	* testsuite/20_util/optional/constexpr/cons/conv.cc: New test.
	* testsuite/20_util/optional/constexpr/modifiers.cc: New test.
	* testsuite/20_util/optional/constexpr/swap.cc: New test.
	* testsuite/20_util/optional/version.cc: New test.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-07-27  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/optional (__throw_bad_optional_access):
	Replace GNU attribute with C++11 attribute.
	(optional::value, optional::value_or): Use if statements
	instead of conditional expressions.
	* include/std/optional (__throw_bad_optional_access)
	(optional::value, optional::value_or): Likewise.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-09-16  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/optional (nullptr_t): Make constructor noexcept.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/98725
	* include/std/ostream (operator<<(basic_ostream<char, Tr>&, wchar_t))
	(operator<<(basic_ostream<char, Tr>&, const wchar_t*)): Always
	define as deleted. Do not check _GLIBCXX_USE_WCHAR_T.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-05  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/ostream (operator<<(const volatile void*)):
	Add new overload, as per P1147R1.
	* testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
	New test.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-22  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/102894
	* include/std/any (make_any): Add SFINAE constraint.
	* testsuite/20_util/any/102894.cc: New test.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-09-23  Jonathan Wakely  <jwakely@redhat.com>

	* src/c++11/system_error.cc (generic_error_category): Define
	class and virtual functions as 'final'.
	(generic_error_category::equivalent(int, const error_condition&)):
	Override.
	(system_error_category): Define class and virtual functions as
	'final'.
	(system_error_category::equivalent(int, const error_condition&)):
	Override.
	(generic_category_instance, system_category_instance): Use
	constinit union to make the objects immortal.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-31  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/98421
	* include/std/span (span(Iter, size_type), span(Iter, Iter)):
	Add valid range checks.
	* testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
	* testsuite/23_containers/span/cons_2_assert_neg.cc: New test.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-28  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/std_function.h (function::function(F&&)): Give
	name to defaulted template parameter, to improve diagnostics.
	Use markdown for more doxygen comments.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-26  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/std_function.h (_function_base::_Base_manager):
	Replace _M_init_functor with a function template using a
	forwarding reference, and a pair of _M_create function
	templates. Reuse _M_create for the clone operation.
	(function::_Decay_t): New alias template.
	(function::_Callable): Simplify by using _Decay.
	(function::function(F)): Change parameter to forwarding
	reference, as per LWG 2447. Add noexcept-specifier. Simplify
	constraints.
	(function::operator=(F&&)): Add noexcept-specifier.
	* testsuite/20_util/function/cons/lwg2774.cc: New test.
	* testsuite/20_util/function/cons/noexcept.cc: New test.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-19  Jonathan Wakely  <jwakely@redhat.com>

	* doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2

2021-11-24  Antony Polukhin  <antoshkka@gmail.com>

	Backported from master:
	2021-08-17  Antony Polukhin  <antoshkka@gmail.com>
		    Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
	if distance is O(1).
	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
	line number.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-26  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/std_function.h (function::function(F)): Add
	static assertions to check constructibility requirements.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-07-22  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/std_function.h (_Function_base): Add
	default member initializers and define constructor as defaulted.
	(function::_M_invoker): Add default member initializer.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-08-18  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/stl_function.h: Improve doxygen comments.

2021-11-24  Tim Adye  <Tim.Adye@cern.ch>

	Backported from master:
	2021-06-04  Tim Adye  <Tim.Adye@cern.ch>

	* include/std/any (any::_Manager::_S_access): New static
	function to access the contained value.
	(any::emplace, __any_caster): Use _S_access member of the
	manager type.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-06-25  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/syncstream (basic_syncbuf::swap()): Remove
	noexcept, as per LWG 3498.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-01  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/100153
	* include/bits/vector.tcc (vector<bool>::_M_shrink_to_fit()):
	When size() is zero just deallocate and reset.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-09-28  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/move.h (forward(remove_reference_t<T>&&)):
	Improve text of static_assert.
	* testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
	* testsuite/20_util/forward/f_neg.cc: Likewise.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-10-08  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/22_locale/conversions/buffer/1.cc: Check
	_GLIBCXX_USE_WCHAR_T.
	* testsuite/22_locale/conversions/buffer/3.cc: Likewise. Add
	test using char16_t.
	* testsuite/22_locale/conversions/string/1.cc: Check
	_GLIBCXX_USE_WCHAR_T.
	* testsuite/27_io/filesystem/path/generic/generic_string.cc:
	Likewise.
	* testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
	Likewise.
	* testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
	* testsuite/27_io/filesystem/path/native/string-char8_t.cc:
	Likewise.
	* testsuite/27_io/filesystem/path/native/string.cc: Likewise.
	* testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
	Likewise.
	* testsuite/experimental/filesystem/path/generic/generic_string.cc:
	Likewise.
	* testsuite/experimental/filesystem/path/native/alloc.cc:
	Likewise.
	* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
	Likewise.
	* testsuite/experimental/filesystem/path/native/string.cc:
	Likewise.

2021-11-24  Jonathan Wakely  <jwakely@redhat.com>

	Backported from master:
	2021-11-05  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/lib/gdb-test.exp: Add target selector support to the
