2019-02-22  Release Manager

	* GCC 8.3.0 released.

2019-02-14  Jonathan Wakely  <jwakely@redhat.com>

	PR middle-end/89303
	* testsuite/20_util/enable_shared_from_this/89303.cc: New test.

2019-02-09  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2019-01-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/88066
	* include/bits/locale_conv.h: Use <> for includes not "".
	* include/ext/random: Likewise.
	* include/ext/vstring.h: Likewise.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	* doc/html/*: Regenerate.

	* src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
	if the path is already absolute.
	[!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.

	Backport from mainline
	2019-01-11  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/chrono (duration_values::zero(), duration_values::min())
	(duration_values::max()): Add noexcept.
	(duration::zero(), duration::min(), duration::max()): Likewise.
	(time_point::zero(), time_point::min(), time_point::max()): Likewise.
	* testsuite/20_util/duration/requirements/noexcept.cc: New test.
	* testsuite/20_util/time_point/requirements/noexcept.cc: New test.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2019-01-07  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87787
	* include/bits/char_traits.h (char_traits::move): Do not pass null
	pointers to memmove.
	* include/bits/locale_facets.h
	(ctype<char>::widen(const char*, const char*, char*)): Do not
	pass null pointers to memcpy.
	(ctype<char>::narrow(const char*, const char*, char, char*)):
	Likewise.
	(ctype<char>::do_widen(const char*, const char*, char*)):
	Likewise.
	(ctype<char>::do_narrow(const char*, const char*, char, char*)):
	Likewise.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-11-23  Martin Sebor  <msebor@redhat.com>
		    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/65229
	* python/libstdcxx/v6/printers.py (StdBitsetPrinter): Handle
	exception thrown for std::bitset<0>.
	* testsuite/libstdc++-prettyprinters/simple.cc: Test std::bitset<0>.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-11-23  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87308 (partial)
	* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Adjust regex to
	work around PR 88166.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2019-02-05  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/89128
	* include/bits/stl_queue.h (queue, priority_queue): Add deduction
	guides.
	* include/bits/stl_stack.h (stack): Likewise.
	* testsuite/23_containers/priority_queue/deduction.cc: New test.
	* testsuite/23_containers/queue/deduction.cc: New test.
	* testsuite/23_containers/stack/deduction.cc: New test.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-11-29  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/88119
	* include/ext/aligned_buffer.h (__aligned_membuf): Add comment.
	(__aligned_buffer): Use __alignof__ instead of std::alignment_of.
	* include/std/type_traits (alignment_of): Use alignof instead of
	__alignof__.
	* testsuite/20_util/alignment_of/value.cc: Fix test to check values
	match alignof not __alignof__, as required by the standard.

2019-02-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-11-28  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83511
	* include/std/string_view (basic_string_view::substr): Add default
	argument to first parameter.
	* include/experimental/string_view (basic_string_view::substr):
	Likewise.
	* testsuite/21_strings/basic_string_view/operations/substr/char/
	83511.cc: New test.
	* testsuite/21_strings/basic_string_view/operations/substr/wchar_t/
	83511.cc: New test.
	* testsuite/experimental/string_view/operations/substr/char/83511.cc:
	New test.
	* testsuite/experimental/string_view/operations/substr/wchar_t/83511.cc:
	New test.

	Backport from mainline
	2018-11-19  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/88084 - Implement LWG 2777
	* include/std/string_view (basic_string_view::copy): Use traits to
	copy.
	* testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
	New test.
	* testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
	New test.

	Backport from mainline
	2018-11-29  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86910
	PR libstdc++/87846
	* src/filesystem/ops.cc (experimental::create_directories): Report
	an error when the path resolves to an existing non-directory (P1164).
	* src/filesystem/std-ops.cc (create_directories): Likewise. Handle
	empty filenames due to trailing slashes.
	* testsuite/27_io/filesystem/operations/create_directories.cc: Test
	when some component of the path exists and is not a directory. Test
	trailing slashes.
	* testsuite/experimental/filesystem/operations/create_directories.cc:
	Likewise.

	Backport from mainline
	2018-11-28  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/intro.xml: Document LWG 3096 change.
	* src/filesystem/std-path.cc (path::lexically_relative(const path&)):
	Treat a final empty element equivalently to a final dot element.
	* testsuite/27_io/filesystem/path/generation/relative.cc: Add checks
	for the examples in the DR.

	Backport from mainline
	2018-07-20  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86595
	* include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
	noexcept.

	Backport from mainline
	2018-05-21  Jonathan Wakely  <jwakely@redhat.com>

	* src/filesystem/std-ops.cc (absolute): Report an error for empty
	paths.
	(weakly_canonical(const path&)): Do not call canonical on empty path.
	(weakly_canonical(const path&, error_code&)): Likewise.
	* testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.

	Backport from mainline
	2019-01-30  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/89117
	* src/c++17/fs_path.cc (path::replace_extension): Erase extension from
	final component as well as from _M_pathname.
	* testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
	Add more test cases.

2019-01-21  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2019-01-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87514
	PR libstdc++/87520
	PR libstdc++/88782
	* include/bits/shared_ptr.h
	(shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
	(allocate_shared): Change to use new tag type.
	(_Sp_alloc_shared_tag): Define new type.
	(_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
	(__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
	Constrain to prevent being called with _Sp_alloc_shared_tag.
	(__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
	Replace constructor with ...
	(__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
	reference parameter so address of the new object can be returned to
	the caller. Obtain the allocator from the tag type.
	(__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
	constructor with ...
	(__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
	to the __shared_count constructor.
	(__allocate_shared): Change to use new tag type.

2019-01-14  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/80762
	* testsuite/experimental/filesystem/path/construct/80762.cc: Add
	dg-require-filesystem-ts directive.

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

	Backport from mainline
	2019-01-04  Jonathan Wakely  <jwakely@redhat.com>

	(path::lexically_normal()): Use std::vector iterators instead of
	path::iterator. Use pop_back to remove components from the end. Clear
	trailing filename, instead of using erase(const_iterator) to remove
	a non-final component.
	* testsuite/27_io/filesystem/path/generation/normal.cc: Test
	additional cases.
	* testsuite/27_io/filesystem/path/generation/normal2.cc: New test.

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

	Backport from mainline
	2018-12-12  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/80762
	* include/bits/fs_path.h (path::_Path): Use remove_cv_t and is_void.
	* include/experimental/bits/fs_path.h (path::_Path): Likewise.
	* testsuite/27_io/filesystem/path/construct/80762.cc: New test.
	* testsuite/experimental/filesystem/path/construct/80762.cc: New test.

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

	Backport from mainline
	2018-05-23  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/fs_path.h (path::_M_type): Change default member
	initializer to _Filename.
	(path::begin): Create past-the-end iterator for empty path.
	(path::has_relative_path()): Return false for empty filenames.
	(path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
	Fix offset of empty final component.
	* testsuite/27_io/filesystem/path/itr/components.cc: New.
	* testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.

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

	Backport from mainline
	2019-01-10  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/util/testsuite_fs.h (nonexistent_path): Include name
	of the source file containing the caller.
	* testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
	directories created by test.
	* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
	Likewise.
	* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	Likewise.
	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: Likewise.

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

	Backport from mainline
	2018-11-27  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/27_io/filesystem/operations/canonical.cc: Remove
	directory created by test.
	* testsuite/27_io/filesystem/operations/symlink_status.cc: Remove
	symlink created by test.

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

	* src/filesystem/std-path.cc (path::remove_filename()): Remove debug
	check that prevents building with -fno-exceptions.

2019-01-09  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
	dg-prune-output. Remove unused header.

	Backport from mainline
	2019-01-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87855
	* include/std/optional (_Optional_payload_base): New class template
	for common code hoisted from _Optional_payload specializations. Use
	a template for the union, to allow a partial specialization for
	types with non-trivial destructors. Add constructors for in-place
	initialization to the union.
	(_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
	to perform non-trivial copy construction, instead of relying on
	non-standard copy elision in a delegating constructor.
	(_Optional_payload(bool, _Optional_payload&&)): Likewise for
	non-trivial move construction.
	(_Optional_payload): Derive from _Optional_payload_base and use it
	for everything except the non-trivial assignment operators, which are
	defined as needed.
	(_Optional_payload<false, C, M>): Derive from the specialization
	_Optional_payload<true, false, false> and add a destructor.
	(_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
	Forward to corresponding members of _Optional_payload.
	(_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
	Hoist common members from _Optional_base.
	(_Optional_base): Make all members and base class public.
	(_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
	_Optional_base_impl.
	* python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
	support for new std::optional layout.
	* testsuite/libstdc++-prettyprinters/compat.cc: New test.

	Backport from mainline
	2018-11-19  Ville Voutilainen  <ville.voutilainen@gmail.com>

	PR libstdc++/87855
	Also implement P0602R4 (variant and optional
	should propagate copy/move triviality) for std::optional.
	* include/std/optional (_Optional_payload): Change
	the main constraints to check constructibility in
	addition to assignability.
	(operator=): Make constexpr.
	(_M_reset): Likewise.
	(_M_construct): Likewise.
	(operator->): Likewise.
	* testsuite/20_util/optional/assignment/8.cc: Adjust.
	* testsuite/20_util/optional/assignment/9.cc: New.

2018-12-23  Iain Sandoe  <iain@sandoe.co.uk>

	Backport from mainline
	2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>

	* scripts/make_exports.pl (check names): Don’t try to export
	construction vtable symbols.

2018-12-22  Iain Sandoe  <iain@sandoe.co.uk>

	Backport from mainline
	2018-12-06  Jonathan Wakely  <jwakely@redhat.com>
		    Iain Sandoe  <iain@sandoe.co.uk>

	PR libstdc++/64883
	* testsuite/17_intro/headers/c++1998/all_attributes.cc: Don't test
	always_inline on Darwin.
	* testsuite/17_intro/headers/c++2011/all_attributes.cc: Likewise.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
	* testsuite/17_intro/headers/c++2017/all_attributes.cc: Likewise.
	* testsuite/17_intro/headers/c++2020/all_attributes.cc: Likewise.

2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>

	Backport from mainline
	2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>

	PR libstdc++/70694
	* configure.host (OPT_LDFLAGS): Don't append
	-fvisibility-inlines-hidden for newer Darwin.

2018-11-28  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/88199
	* include/bits/hashtable.h
	(_Hashtable<>::_M_move_assign(_Hashtable&&, false_type)): Deallocate
	former buckets after assignment.
	* testsuite/23_containers/unordered_set/allocator/move_assign.cc
	(test03): New.

2018-11-22  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-11-22  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/85930
	PR libstdc++/87520
	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti)
	[__cpp_rtti]: Define even when RTTI is enabled. Use array of
	sizeof(type_info) so that type-punned reference binds to an object
	of the correct size as well as correct alignment.
	(_Sp_counted_ptr_inplace::_M_get_deleter) [__cpp_rtti]: Check for
	_S_ti() reference even when RTTI is enabled.
	(__shared_ptr(_Sp_make_shared_tag, const _Alloc&, _Args&&...))
	[__cpp_rtti]: Pass _S_ti() instead of typeid(_Sp_make_shared_tag).

2018-10-31  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-10-31  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87822
	* include/bits/stl_pair.h (__pair_base): Change to class template.
	(pair): Make base class type depend on template parameters.
	* testsuite/20_util/pair/87822.cc: New test.

2018-10-30  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-10-30  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87809
	* include/bits/forward_list.h (_Fwd_list_impl::_Fwd_list_impl()): Use
	trait in exception-specification instead of possibly invalid
	expression.
	* include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()):
	Likewise.
	* include/bits/stl_list.h (_List_impl::_List_impl()): Likewise.
	* testsuite/23_containers/forward_list/cons/87809.cc: New test.
	* testsuite/23_containers/list/cons/87809.cc: New test.
	* testsuite/23_containers/vector/bool/cons/87809.cc: New test.
	* testsuite/23_containers/vector/cons/87809.cc: New test.

2018-10-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87749
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
	(basic_string::operator=(basic_string&&)): For short strings copy the
	buffer inline. Only fall back to using assign(const basic_string&) to
	do a deep copy when reallocation is needed.
	* testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
	New test.
	* testsuite/21_strings/basic_string/modifiers/assign/char/
	move_assign_optim.cc: New test.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
	New test.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
	move_assign_optim.cc: New test.

2018-10-23  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87704
	* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
	not delegate to default constructor.
	(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
	* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.

2018-10-19  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/regex_executor.tcc (_Backref_matcher::_M_apply): Use
	_GLIBCXX_STD_A to refer to normal mode algorithms.
	* testsuite/28_regex/headers/regex/parallel_mode.cc: New test.
	* testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Remove empty
	whitespace.

2018-10-18  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-10-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87641
	* include/bits/valarray_array.h (__valarray_sum): Use first element
	to initialize accumulator instead of value-initializing it.
	* testsuite/26_numerics/valarray/87641.cc: New test.

2018-10-15  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
	account for change to glibc it_IT localedata (glibc bz#10797).

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-07-31  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86751
	* include/bits/stl_pair.h (__pair_base): New class with deleted copy
	assignment operator.
	(pair): Derive from __pair_base.
	(pair::operator=): Remove deleted overload.
	* python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
	so that new base class isn't shown in GDB.
	* testsuite/20_util/pair/86751.cc: New test.
	* testsuite/20_util/pair/ref_assign.cc: New test.

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-09-03  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/78595
	* include/bits/stl_map.h (map::insert(_Pair&&))
	(map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
	* include/bits/stl_multimap.h (multimap::insert(_Pair&&))
	(multimap::insert(const_iterator, _Pair&&)): Likewise.
	* include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
	(unordered_map::insert(const_iterator, _Pair&&))
	(unordered_multimap::insert(_Pair&&))
	(unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
	* include/std/type_traits (__enable_if_t): Define for C++11.
	* testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
	* testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
	* testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
	* testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
	test.

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-08-30  Jonathan Wakely  <jwakely@redhat.com>

	* include/ext/pointer.h (_Pointer_adapter): Define operators for
	pointer arithmetic using long long offsets.
	* testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using
	long long values.

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-08-23  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/21_strings/basic_string/init-list.cc:
	Require cxx11-abi.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
	Likewise.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
	Likewise.

	Backport from mainline
	2018-08-22  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87061
	* include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
	(experimental::pmr::match_results, experimental::pmr::cmatch)
	(experimental::pmr::smatch, experimental::pmr::wcmatch)
	(experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
	because COW strings don't support C++11 allocator model.
	* include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
	(experimental::pmr::basic_string, experimental::pmr::string)
	(experimental::pmr::u16string, experimental::pmr::u32string)
	(experimental::pmr::wstring): Likewise.

	Backport from mainline
	2018-08-15  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/regex: Remove begin/end macros for namespace.
	* include/experimental/string: Likewise.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_forward_list.cc: New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_multimap.cc: New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_multiset.cc: New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
	New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_unordered_map.cc: New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_unordered_multimap.cc: New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_unordered_multiset.cc: New test.
	* testsuite/experimental/polymorphic_allocator/
	pmr_typedefs_unordered_set.cc: New test.
	* testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
	New test.

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-07-24  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/70966
	* include/experimental/memory_resource (__get_default_resource): Use
	placement new to create an object with dynamic storage duration.

	Backport from mainline
	2018-06-20  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/70966
	* include/experimental/memory_resource (__resource_adaptor_imp): Add
	static assertions to enforce requirements on pointer types.
	(__resource_adaptor_imp::get_allocator()): Add noexcept.
	(new_delete_resource, null_memory_resource): Return address of an
	object with dynamic storage duration.
	(__null_memory_resource): Remove.
	* testsuite/experimental/memory_resource/70966.cc: New.

2018-10-12  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/77854
	* doc/xml/manual/status_cxx1998.xml: Document size_type and
	difference_type for containers.
	* doc/html/*: Regenerate.

2018-10-08  Joseph Myers  <joseph@codesourcery.com>

	Backport from mainline
	2018-10-02  Joseph Myers  <joseph@codesourcery.com>

	* testsuite/lib/libstdc++.exp (libstdc++_init): Use
	-fno-show-column in default cxxflags.

2018-10-08  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-10-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87538
	* include/std/functional (_Not_fn::operator()): Check value of
	__is_nothrow_invocable as well.
	* testsuite/20_util/function_objects/not_fn/87538.cc: New test.
	* testsuite/experimental/functional/87538.cc: New test.

2018-09-11  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87278
	* include/bits/shared_ptr.h (make_shared): Use remove_cv instead of
	remove_const.
	* testsuite/20_util/shared_ptr/creation/87278.cc: New test.

2018-08-28  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87116
	* src/filesystem/std-path.cc (path::lexically_normal): When handling
	a dot-dot filename, preserve an empty final component in the iteration
	sequence.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
	root-directory.
	* testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
	for more than two adjacent dot-dot filenames.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
	preferred-separator in expected normalized strings.

2018-08-13  Jonathan Wakely  <jwakely@redhat.com>

	Revert
	2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	PR target/85904
	* configure.ac: Define HAVE_ALIGNED_ALLOC if building for
	Newlib.
	* configure: Regenerate.

2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	Backport from mainline
	2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	PR target/85904
	* configure.ac: Define HAVE_ALIGNED_ALLOC if building for
	Newlib.
	* configure: Regenerate.

2018-08-08  Jonathan Wakely  <jwakely@redhat.com>

	* libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
	avoid clashing with an ::aligned_alloc function that was not detected
	by configure.

	PR libstdc++/86597
	* include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
	Clear error_code when cached type is used.
	* testsuite/27_io/filesystem/directory_entry/86597.cc: New test.

	* doc/xml/manual/using.xml: Remove C++2a headers not on gcc-8-branch.
	* doc/html/*: Regenerate.

	* doc/xml/manual/using.xml: Add missing header to table and fix typo.
	Remove C++17 headers not present on gcc-8-branch.
	* doc/html/*: Regenerate.

2018-08-07  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-07-31  Jonathan Wakely  <jwakely@redhat.com>

	* doc/xml/manual/test.xml: Improve documentation on writing tests for
	newer standards.
	* doc/xml/manual/using.xml: Document all headers for C++11 and later.
	* doc/html/*: Regenerate.

	Backport from mainline
	2018-05-03  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/84535
	* include/std/thread (thread::__not_same): New SFINAE helper.
	(thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
	first argument is not a std::thread. Add static assertion to check
	INVOKE expression is valid.
	(thread::thread(thread&), thread::thread(const thread&&)): Remove.
	* testsuite/30_threads/thread/cons/84535.cc: New.

	Backport from mainline
	2018-08-03  Jonathan Wakely  <jwakely@redhat.com>

	* src/c++11/system_error.cc
	(system_error_category::default_error_condition): Add workaround for
	ENOTEMPTY and EEXIST having the same value on AIX.
	* testsuite/19_diagnostics/error_category/system_category.cc: Add
	extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.

	Backport from mainline
	2018-08-01  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/60555
	* src/c++11/system_error.cc
	(system_error_category::default_error_condition): New override to
	check for POSIX errno values.
	* testsuite/19_diagnostics/error_category/generic_category.cc: New
	* testsuite/19_diagnostics/error_category/system_category.cc: New
	test.

	Backport from mainline
	2018-08-07  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86874
	* include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
	here instead of in _Move_assign_base.
	(_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
	(_Copy_assign_base::operator=): Use _M_destructive_move when changing
	the contained value to another alternative.
	(_Move_assign_base::operator=): Likewise.
	(_Move_assign_base::_M_destructive_move): Remove.
	* testsuite/20_util/variant/86874.cc: New test.

	Backport from mainline
	2018-08-07  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86861
	* libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
	Replace macro with inline function.
	[__sun]: Increase alignment to meet memalign precondition.
	[!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
	(aligned_alloc): Move check for valid alignment to operator new.
	Remove redundant check for non-zero size, it's enforced by the caller.
	(operator new): Move check for valid alignment here. Use
	__builtin_expect on check for zero size.

2018-07-31  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-07-30  Jonathan Wakely  <jwakely@redhat.com>

	* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
	workaround for aligned_alloc bug on AIX.
	* testsuite/18_support/new_aligned.cc: New test.

	Backport from mainline
	2018-07-20  Fangrui Song  <maskray@google.com>

	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
	_GLIBCXX_VISIBILITY(default).

	Backport from mainline
	2018-07-30  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86734
	* include/bits/stl_iterator.h (reverse_iterator::operator->): Use
	addressof (LWG 2188).
	* testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.

	Backport from mainline
	2018-05-08  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/85672
	* include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
	to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
	within conditional block.

	Backport from mainline
	2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>

	PR libstdc++/84654
	* acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
	* config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
	* configure: Regenerate.
	* include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
	based on ENABLE_FLOAT128.
	* include/Makefile.in: Regenerate.
	* include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
	[!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
	_GLIBCXX_USE_FLOAT128.

2018-07-26  Marek Polacek  <polacek@redhat.com>

	* testsuite/30_threads/condition_variable_any/cond.cc: New.

2018-07-26  Release Manager

	* GCC 8.2.0 released.

2018-07-18  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-07-05  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
	COW strings.
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.

	Backport from mainline
	2018-07-04  Jonathan Wakely  <jwakely@redhat.com>

	* testsuite/25_algorithms/make_heap/complexity.cc: Require effective
	target for std::random_device.
	* testsuite/26_numerics/random/random_device/cons/default.cc:
	Likewise.
	* testsuite/experimental/algorithm/sample-2.cc: Likewise.
	* testsuite/experimental/algorithm/shuffle.cc: Likewise.
	* testsuite/experimental/random/randint.cc: Likewise.
	* testsuite/lib/libstdc++.exp
	(check_effective_target_random_device): New proc.

	Backport from mainline
	2018-06-26  David Edelsohn  <dje.gcc@gmail.com>

	* testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
	directives.
	* testsuite/experimental/algorithm/shuffle.cc: Likewise.

	Backport from mainline
	2018-06-25  Jonathan Wakely  <jwakely@redhat.com>

	* include/experimental/algorithm (sample, shuffle): Add new overloads
	using per-thread random number engine.
	* testsuite/experimental/algorithm/sample.cc: Simpify and reduce
	dependencies by using __gnu_test::test_container.
	* testsuite/experimental/algorithm/sample-2.cc: New.
	* testsuite/experimental/algorithm/shuffle.cc: New.

2018-07-16  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
	* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.

2018-07-05  François Dumont  <fdumont@gcc.gnu.org>

	Backport from mainline
	2018-07-04  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/86272
	* include/debug/string
	(__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
	Use __glibcxx_check_insert_range.

2018-07-04  Jonathan Wakely  <jwakely@redhat.com>

	Backport from mainline
	2018-05-19  Jonathan Wakely  <jwakely@redhat.com>

	* src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
	[__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
	little_endian element in bitmask.
	* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
	* testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.

	Backport from mainline
	2018-07-03  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/alloc_traits.h: Remove redundant preprocessor
	condition.

	Backport from mainline
	2018-06-27  Jonathan Wakely  <jwakely@redhat.com>

	* include/bits/cpp_type_traits.h [__cplusplus >= 201703]
	(__is_byte<byte>): Define specialization for std::byte.

	Backport from mainline
	2018-06-18  Jonathan Wakely  <jwakely@redhat.com>

	LWG 3050 Fix cv-qualification of convertibility constraints
	* include/std/chrono (duration, operator*, operator/, operator%): Use
	const-qualified type as source type in is_convertible constraints.
	* testsuite/20_util/duration/arithmetic/dr3050.cc: New.
	* testsuite/20_util/duration/cons/dr3050.cc: New.
	* testsuite/20_util/duration/literals/range.cc: Rename to...
	* testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
	dg-error lineno.

	Backport from mainline
	2018-06-13  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86127
	* include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
	unused typedef.
	(_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
	Use node allocator to create and destroy elements.
	(forward_list::_Tp_alloc_type): Remove unused typedef.
	(forward_list::_Alloc_traits): Use allocator_traits instead of
	__gnu_cxx::__alloc_traits.

	Backport from mainline
	2018-05-29  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/variant (__erased_dtor): Qualify call to __get.

	Backport from mainline
	2018-05-15  Jonathan Wakely  <jwakely@redhat.com>

	* include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
	__invoke to prevent ADL.

	Backport from mainline
	2018-05-24  Maya Rashish  <coypu@sdf.org>

	PR target/85904
	* crossconfig.m4: Test for aligned_alloc on netbsd.
	* configure: Regenerate.

	Backport from mainline
	2018-05-18  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/85098
	* include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
	(basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
	(basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
	(basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
	definitions.
	* include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
	whitespace.
	* include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
	braces around body of do-while.
	* testsuite/28_regex/basic_regex/85098.cc: New

	Backport from mainline
	2018-05-07  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/85671
	* include/bits/fs_path.h (operator/): Permit copy elision.
	* include/experimental/bits/fs_path.h (operator/): Likewise.

	Backport from mainline
	2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
		    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/83982
	* include/bits/vector.tcc (vector::_M_default_append(size_type)):
	Default-construct new elements before moving existing ones.
	* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
	New.

	Backport from mainline
	2018-06-25  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86292
	* include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
	Add try-catch block.
	* testsuite/23_containers/vector/cons/86292.cc: New.

	Backport from mainline
	2018-06-27  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/86138
	* include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
	Declare explicit instantiations of COW empty reps and I/O functions.

	Backport from mainline
	2018-06-16  Jonathan Wakely  <jwakely@redhat.com>

	LWG 3076 basic_string CTAD ambiguity
	* doc/xml/manual/intro.xml: Document LWG 3076 change.
	* include/bits/basic_string.h
	[__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
	(basic_string(const _CharT*, const _Alloc&)): Turn into a function
	template constrained by _RequireAllocator.
	(basic_string(size_type, _CharT, const _Alloc&)): Likewise.
	* src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
	Define.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
	deduction
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.

	Backport from mainline
	2018-06-14  Jonathan Wakely  <jwakely@redhat.com>

	LWG 3075 basic_string needs deduction guides from basic_string_view
	* include/bits/basic_string.h: Add deduction guides from string_view.
	* testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
	deduction from string views.
	* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
	Likewise.

	Backport from mainline
	2018-05-03  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/84087 LWG DR 2268 basic_string default arguments
	* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
	(append(const basic_string&, size_type, size_type)
	(assign(const basic_string&, size_type, size_type)
	(insert(size_type, const basic_string&, size_type, size_type)
	(replace(size_type,size_type,const basic_string&,size_type,size_type)
	(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
