2018-05-15 Jonathan Wakely PR libstdc++/85749 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper. (linear_congruential_engine, mersenne_twister_engine) (subtract_with_carry_engine, discard_block_engine) (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to constrain function templates taking seed sequences. * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&)) (mersenne_twister_engine::seed(_Sseq&)) (subtract_with_carry_engine::seed(_Sseq&)): Change return types to match declarations. * include/ext/random (simd_fast_mersenne_twister_engine): Use __is_seed_seq to constrain function templates taking seed sequences. * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed): Change return type to match declaration. * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc: New. * testsuite/26_numerics/random/independent_bits_engine/cons/ seed_seq2.cc: New. * testsuite/26_numerics/random/linear_congruential_engine/cons/ seed_seq2.cc: New. * testsuite/26_numerics/random/mersenne_twister_engine/cons/ seed_seq2.cc: New. * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno. * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc: New. * testsuite/26_numerics/random/subtract_with_carry_engine/cons/ seed_seq2.cc: New. * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/ seed_seq2.cc: New. PR libstdc++/83891 * include/bits/fs_path.h (path::is_absolute()): Use same definition for all operating systems. * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise. * testsuite/27_io/filesystem/path/query/is_absolute.cc: New. * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment. * testsuite/experimental/filesystem/path/query/is_absolute.cc: New. * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove unused header. * testsuite/27_io/filesystem/path/query/empty.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_root_directory.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise. * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise. * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/extension.cc: Likewise. * testsuite/experimental/filesystem/path/query/empty.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_extension.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_filename.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_parent_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_relative_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_directory.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_name.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise. * testsuite/experimental/filesystem/path/query/is_relative.cc: Likewise. PR libstdc++/84159 * include/bits/fs_path.h (path::operator/=, path::append): Construct temporary path before calling _M_append. (path::_M_append): Change parameter to path and implement C++17 semantics. * testsuite/27_io/filesystem/path/append/path.cc: Add helper function and more examples from the standard. * testsuite/27_io/filesystem/path/append/source.cc: New. * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment. * testsuite/27_io/filesystem/path/nonmember/append.cc: New. * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify __invoke to prevent ADL. 2018-05-14 Jonathan Wakely PR libstdc++/81256 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow exceptions from _M_terminate_output(). * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any exceptions from close(). * testsuite/27_io/basic_filebuf/close/81256.cc: New. * include/bits/valarray_array.h (__valarray_get_memory): Remove. (__valarray_get_storage): Call operator new directly. Remove ignored top-level restrict qualifier and add malloc attribute instead. (_Array<_Tp>::_Array(size_t)): Remove unused constructor. PR libstdc++/67554 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>) (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy. PR libstdc++/82966 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value instead of type. * testsuite/23_containers/set/modifiers/node_swap.cc: New. 2018-05-13 Ville Voutilainen PR libstdc++/80165 * testsuite/20_util/variant/80165.cc: New. 2018-05-10 Jonathan Wakely * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer. * doc/xml/manual/debug_mode.xml: Add array and forward_list to list of C++11 containers with Debug Mode support. * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure. * doc/html/*: Regenerate. 2018-05-10 Jason Merrill * include/bits/regex_compiler.h (_S_cache_size): Change from function to variable. 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net> PR libstdc++/83140 - assoc_legendre returns negated value when m is odd * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase argument defaulted to +1. Doxy comments on same. * testsuite/special_functions/02_assoc_legendre/ check_value.cc: Regen. * testsuite/tr1/5_numerical_facilities/special_functions/ 02_assoc_legendre/check_value.cc: Regen. 2018-05-10 Jonathan Wakely PR libstdc++/85729 * include/bits/c++config.h (__replacement_assert): Add linkage specification. * include/bits/std_abs.h: Add comment to closing brace of block. * include/c_global/cstddef: Add linkage specification. * include/c_global/cstring: Likewise. * include/c_global/cwchar: Likewise. 2018-05-09 François Dumont * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()): Rename in... (_Safe_iterator<>::_S_constant()): ...that. * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_constant()): Rename in... (_Safe_local_iterator<>::_S_constant()): ...that. * include/debug/formatter.h: Remove bits/cpp_type_traits.h include. (_Iterator_state::__rbegin): New. (_Iterator_state::__rmiddle): New. (_Iterator_state::__rend): New. (_Parameter::_Parameter(const _Safe_iterator<>&, const char*, _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying iterator type. (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise. (_Parameter::_S_reverse_state(_Iterator_state)): New. (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*, _Is_iterator)): New. (_Parameter(std::reverse_iterator<> const&, const char*, _Is_iterator)): New. (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&, const char*, _Is_iterator)): New. (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator): New. (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*, _Is_iterator)): New. * testsuite/24_iterators/move_iterator/debug_neg.cc: New. * testsuite/24_iterators/normal_iterator/debug_neg.cc: New. * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New. 2018-05-09 Jonathan Wakely * include/bits/std_function.h (_Base_manager::_M_get_pointer): Use constexpr if in C++17 mode. (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)): Copy from const object. * testsuite/20_util/function/cons/non_copyconstructible.cc: New. 2018-05-08 François Dumont * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h. [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render backtrace. * include/debug/macros.h (__glibcxx_check_valid_range_at): New. * include/debug/functions.h (__check_valid_range): Use latter. * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New, use latter. * include/debug/deque (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter. * include/debug/forward_list (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/list (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/list (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/map.h (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)): Likewise. * include/debug/multimap.h (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)): Likewise. * include/debug/set.h (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)): Likewise. * include/debug/multiset.h (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)): Likewise. * include/debug/string (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/unordered_map (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/unordered_set (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise. * include/debug/vector (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter. * include/debug/formatter.h (_Error_formatter::_M_function): New. (_Error_formatter(const char*, unsigned int)): Adapt. (_Error_formatter::_M_at): Rename in... (_Error_formatter::_S_at): ...that and adapt. * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New. (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt. * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function when available. 2018-05-08 Jonathan Wakely * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA): Use normal std::vector even in Debug Mode. 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. 2018-05-07 Jonathan Wakely * doc/xml/manual/using.xml (table.cmd_options): Document that the C++17 Filesystem implementation also needs -lstdc++fs. PR libstdc++/85671 * include/bits/fs_path.h (operator/): Permit copy elision. * include/experimental/bits/fs_path.h (operator/): Likewise. 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net> Moar PR libstdc++/80506 * include/bits/random.tcc (gamma_distribution::__generate_impl()): Fix magic number used in loop condition. 2018-05-04 Jonathan Wakely PR libstdc++/85642 fix is_nothrow_default_constructible> * include/std/optional (_Optional_payload): Add noexcept to default constructor. Re-indent. (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to constructor for copying disengaged payloads. (_Optional_payload<_Tp, true, false, true>): Likewise. (_Optional_payload<_Tp, true, true, false>): Likewise. (_Optional_payload<_Tp, true, false, false>): Likewise. * testsuite/20_util/optional/cons/85642.cc: New. * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines. 2018-05-03 Jonathan Wakely PR libstdc++/82644 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use inline definitions instead of using-declarations. [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise. * testsuite/tr1/5_numerical_facilities/special_functions/ 07_conf_hyperg/compile_cxx17.cc: New. * testsuite/tr1/5_numerical_facilities/special_functions/ 17_hyperg/compile_cxx17.cc: New. PR libstdc++/84769 * include/std/variant (visit): Qualify std::get call. PR libstdc++/85632 use uintmax_t for arithmetic * src/filesystem/ops.cc (experimental::filesystem::space): Perform arithmetic in result type. * src/filesystem/std-ops.cc (filesystem::space): Likewise. * testsuite/27_io/filesystem/operations/space.cc: Check total capacity is greater than free space. * testsuite/experimental/filesystem/operations/space.cc: New. * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New. * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc: New. * testsuite/20_util/remove_cvref/value.cc: New. * testsuite/20_util/remove_cvref/value_ext.cc: New. 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)): Add default arguments (LWG 2268). [_GLIBCXX_USE_CXX11_ABI=0] (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)): Likewise. * testsuite/21_strings/basic_string/dr2268.cc: New test. 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. (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use __invoke_result for return types and remove exception specifications. * testsuite/30_threads/thread/cons/84535.cc: New. * include/std/future (__async_result_of): Use __invoke_result instead of result_of. * include/std/any (any_cast): Use __remove_cvref_t. * include/std/tuple (__make_tuple): Likewise. * include/std/type_traits (__remove_cvref_t): Define. (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t. [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define. * include/std/variant (__erased_hash): Use __remove_cvref_t. 2018-05-02 François Dumont * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise. * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise. * include/bits/stl_bvector.h (vector::_M_assign_aux): Likewise. * testsuite/23_containers/deque/modifiers/assign/1.cc: New. * testsuite/23_containers/list/modifiers/assign/1.cc: New. * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New. * testsuite/23_containers/vector/modifiers/assign/1.cc: New. 2018-05-02 Jonathan Wakely PR libstdc++/68197 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast indices to unsigned. * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices as failure. Refactor error handling. * testsuite/27_io/ios_base/storage/68197.cc: New. PR libstdc++/57997 PR libstdc++/83860 * include/bits/gslice_array.h (gslice_array): Define default constructor as deleted, as per C++11 standard. * include/bits/mask_array.h (mask_array): Likewise. * include/bits/slice_array.h (slice_array): Likewise. * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move to namespace __detail. (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data members. * include/bits/valarray_before.h (_ValArrayRef): New helper for type of data members in closure objects. (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase) (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace __detail. (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1) (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2) (_SBase::_M_expr): Use _ValArrayRef for type of data members. * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos) (_ValFunClos, _RefFunClos): Move to namespace __detail and add using-declarations to namespace std. * testsuite/26_numerics/valarray/83860.cc: New. * testsuite/backward/strstream_move.cc: Remove duplicate function call. PR libstdc++/69608 * include/backward/strstream (strstreambuf): Define move constructor and move assignment operator. (istrstream, ostrstream, strstream): Likewise. * testsuite/backward/strstream_move.cc: New. 2018-05-01 Tulio Magno Quites Machado Filho 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-04-24 H.J. Lu * configure: Regenerated. 2018-04-19 Jakub Jelinek * configure: Regenerated. 2018-04-18 Jonathan Wakely Jakub Jelinek PR libstdc++/85442 * src/c++11/Makefile.am: Don't generate debuginfo again for cxx11-ios_failure-lt.s and cxx11-ios_failure.s files. * src/c++11/Makefile.in: Regenerate. 2018-04-18 Jonathan Wakely PR libstdc++/84442 * testsuite/30_threads/thread/cons/terminate.cc [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit. 2018-04-18 David Malcolm PR jit/85384 * configure: Regenerate. 2018-04-16 Jonathan Wakely * testsuite/experimental/filesystem/file_status/1.cc: Add -DUSE_FILESYSTEM_TS to dg-options. * testsuite/experimental/filesystem/iterators/directory_iterator.cc: Likewise. * testsuite/experimental/filesystem/iterators/pop.cc: Likewise. * testsuite/experimental/filesystem/iterators/ recursive_directory_iterator.cc: Likewise. * testsuite/experimental/filesystem/operations/absolute.cc: Likewise. * testsuite/experimental/filesystem/operations/canonical.cc: Likewise. * testsuite/experimental/filesystem/operations/copy.cc: Likewise. * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise. * testsuite/experimental/filesystem/operations/create_directories.cc: Likewise. * testsuite/experimental/filesystem/operations/create_directory.cc: Likewise. * testsuite/experimental/filesystem/operations/create_symlink.cc: Likewise. * testsuite/experimental/filesystem/operations/current_path.cc: Likewise. * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise. * testsuite/experimental/filesystem/operations/exists.cc: Likewise. * testsuite/experimental/filesystem/operations/file_size.cc: Likewise. * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise. * testsuite/experimental/filesystem/operations/last_write_time.cc: Likewise. * testsuite/experimental/filesystem/operations/permissions.cc: Likewise. * testsuite/experimental/filesystem/operations/read_symlink.cc: Likewise. * testsuite/experimental/filesystem/operations/remove.cc: Likewise. * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise. * testsuite/experimental/filesystem/operations/status.cc: Likewise. * testsuite/experimental/filesystem/operations/temp_directory_path.cc: Likewise. * testsuite/experimental/filesystem/path/append/path.cc: Likewise. * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise. * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise. * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise. * testsuite/experimental/filesystem/path/compare/path.cc: Likewise. * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise. * testsuite/experimental/filesystem/path/concat/path.cc: Likewise. * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise. * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise. * testsuite/experimental/filesystem/path/construct/default.cc: Likewise. * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise. * testsuite/experimental/filesystem/path/construct/range.cc: Likewise. * testsuite/experimental/filesystem/path/construct/string_view.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/extension.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/filename.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/parent_path.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/relative_path.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/root_directory.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/root_name.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/root_path.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise. * testsuite/experimental/filesystem/path/generic/generic_string.cc: Likewise. * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc: Likewise. * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise. * testsuite/experimental/filesystem/path/native/string.cc: Likewise. * testsuite/experimental/filesystem/path/nonmember/hash_value.cc: Likewise. * testsuite/experimental/filesystem/path/query/empty.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_extension.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_filename.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_parent_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_relative_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_directory.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_name.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_root_path.cc: Likewise. * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise. * testsuite/experimental/filesystem/path/query/is_relative.cc: Likewise. 2018-04-13 Jonathan Wakely * src/c++11/Makefile.am: Fix sed command. * src/c++11/Makefile.in: Regenerate. * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to handle mangled names starting with double underscores on darwin. * src/c++11/Makefile.in: Regenerate. 2018-04-12 Jonathan Wakely * src/c++11/Makefile.am: Fix comment. * src/c++11/Makefile.in: Regenerate. * src/c++11/cxx11-ios_failure.cc: Fix comment. * src/c++98/ios_failure.cc: Likewise. * src/c++11/ios.cc: Remove redundant macro definition. 2018-04-11 Jonathan Wakely * doc/xml/manual/abi.xml: Document header locations in recent releases. * doc/xml/manual/evolution.xml: Add API changes since GCC 5. * doc/xml/manual/spine.xml: Update copyright years. * doc/xml/manual/strings.xml: Adjust tolower example to avoid undefined behaviour. * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests. * doc/html/*: Regenerate. 2018-04-10 Jonathan Wakely * doc/xml/faq.xml: Update links to archived copy of SGI STL docs. * doc/xml/manual/backwards_compatibility.xml: Likewise. * doc/xml/manual/containers.xml: Likewise. * doc/xml/manual/debug_mode.xml: Likewise. * doc/xml/manual/extensions.xml: Likewise. * doc/xml/manual/policy_data_structures_biblio.xml: Likewise. * doc/xml/manual/using.xml: Likewise. * doc/xml/manual/utilities.xml: Likewise. PR libstdc++/85222 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for cxx11-ios_failure.cc to rewrite type info for __ios_failure. * src/c++11/Makefile.in: Regenerate. * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info): New types. [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here. * src/c++11/ios.cc (__throw_ios_failure): Remove definition. * src/c++98/ios_failure.cc (__construct_ios_failure) (__destroy_ios_failure, is_ios_failure_handler): New functions. [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here. * testsuite/27_io/ios_base/failure/dual_abi.cc: New. * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to handler types, to always catch std::ios_base::failure. * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/char/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/ exceptions_failbit.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/extractors_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise. * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/char/ exceptions_null.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ exceptions_null.cc: Likewise. * testsuite/27_io/ios_base/storage/2.cc: Likewise. 2018-04-05 Jonathan Wakely * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify __get calls to avoid ADL and avoid ambiguity due to Clang bug. 2018-04-03 Jonathan Wakely PR libstdc++/85183 * include/std/variant (_Move_assign_base::operator=): Fix incorrect value categories. * testsuite/20_util/variant/85183.cc: New. 2018-03-26 Jonathan Wakely * include/std/variant (__get): Qualify calls to avoid ADL. (__select_index): Adjust whitespace. (variant): Add using-declaration to workaround Clang bug. 2018-03-22 Jonathan Wakely PR libstdc++/85040 * include/bits/stl_function.h (greater::__not_overloaded) (less::__not_overloaded, greater_equal::__not_overloaded) (less_equal::__not_overloaded): Fix ambiguous specializations. * testsuite/20_util/function_objects/comparisons_pointer.cc: Add tests for type with overloaded operators. 2018-03-22 Rainer Orth PR libstdc++/77691 * testsuite/experimental/memory_resource/resource_adaptor.cc: xfail execution on 32-bit Solaris/x86. 2018-03-21 Jonathan Wakely * testsuite/20_util/function_objects/comparisons_pointer.cc: Use VERIFY instead of assert. * testsuite/20_util/hash/84998.cc: New test. * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New copy of test adjusted for Debug Mode. * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run test in Debug Mode. 2018-03-20 François Dumont PR libstdc++/84998 * include/bits/stl_bvector.h: Fix std::hash friend declaration. * include/std/bitset: Likewise. * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend declaration. * include/bits/stl_multimap.h (std::multimap<>): Likewise. * include/bits/stl_multiset.h (std::multiset<>): Likewise. * include/bits/stl_set.h (std::set<>): Likewise. * include/bits/unordered_map.h (std::unordered_map<>): Fix _Hash_merge_helper friend declaration. (std::unordered_multimap<>): Likewise. * include/bits/unordered_set.h (std::unordered_set<>): Likewise. (std::unordered_multiset<>): Likewise. 2018-03-19 Gerald Pfeifer * doc/xml/api.xml: www.fsf.org has moved to https. Also omit trailing slash for domain level link. * doc/xml/faq.xml: Ditto. * doc/xml/manual/appendix_free.xml (software): Ditto. * doc/xml/manual/intro.xml: Ditto. * doc/xml/manual/spine.xml: Ditto. * doc/xml/spine.xml: Ditto. 2018-03-19 Gerald Pfeifer * doc/xml/manual/documentation_hacking.xml: Adjust link to docbook.org. 2018-03-17 Jonathan Wakely * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust to compile as C++98. 2018-03-14 Jonathan Wakely PR libstdc++/78420 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>) (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations to ensure total order for pointers. (greater, less, greater_equal, less_equal): Add operator() overloads for pointer arguments and make generic overloads dispatch to new _S_cmp functions when comparisons would use built-in operators for pointers. * testsuite/20_util/function_objects/comparisons_pointer.cc: New. 2018-03-12 Jonathan Wakely PR libstdc++/84773 PR libstdc++/83662 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32. * configure: Regenerate. * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC] (aligned_alloc): Add using-declaration. * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test. 2018-03-09 François Dumont * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary): Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers registration. 2018-03-09 Jonathan Wakely PR libstdc++/84769 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>): Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>. src/filesystem/ops.cc (create_dir): Pass error_code to is_directory. src/filesystem/std-ops.cc (create_dir): Likewise. 2018-03-08 François Dumont * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New. (StdListIteratorPrinter): Inherit from latter. (StdFwdListIteratorPrinter): New, inherit from latter. (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer when iterator has no associated container. (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace registrations. * testsuite/libstdc++-prettyprinters/debug.cc: Adapt. * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt. 2018-03-06 Ville Voutilainen PR libstdc++/84601 * include/std/optional (_Optional_payload): Split into multiple specializations that can handle different cases of trivial or non-trivial assignment operators. * testsuite/20_util/optional/84601.cc: New. * testsuite/20_util/optional/cons/value_neg.cc: Adjust. 2018-03-02 Jonathan Wakely PR libstdc++/84671 * include/bits/parse_numbers.h (_Number_help): Add partial specialization to handle digit separators. Adjust partial specialization for recursion temrination to require _Pow == 1ULL. * testsuite/20_util/duration/literals/84671.cc: New 2018-02-27 Ville Voutilainen Implement the missing bits of LWG 2769 * include/std/any (any_cast(const any&)): Add static_assert. (any_cast(any&)): Likewise. (any_cast(any&&)): Likewise, and remove the handling for copyable-but-not-movable type. * testsuite/20_util/any/misc/any_cast.cc: Adjust. * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and add new tests. 2018-02-23 Jonathan Wakely PR libstdc++/84532 * include/std/thread (thread::__make_invoker): Construct tuple directly instead of using make_tuple. * testsuite/30_threads/async/84532.cc: New. * testsuite/30_threads/thread/84532.cc: New. 2018-02-20 François Dumont * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION] (template<> __aligned_buffer): Define as __aligned_membuf alias. 2018-02-19 Igor Tsimbalist PR target/84148 * configure: Regenerate. 2018-02-15 Jonathan Wakely PR libstdc++/81797 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define. * configure: Regenerate. * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when defined. * include/Makefile.in: Regenerate. 2018-01-29 Jonathan Wakely PR libstdc++/83833 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: Add -ffloat-store to options for m68k and ia32. * doc/xml/faq.xml: Update copyright years. * doc/html/*: Regenerate. PR libstdc++/83658 * include/std/any (any::__do_emplace): Only set _M_manager after constructing the contained object. * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line. * testsuite/20_util/any/modifiers/83658.cc: New test. 2018-01-25 Jonathan Wakely PR libstdc++/81076 * include/c_global/cstddef (__byte_operand): Define primary template. * testsuite/18_support/byte/81076.cc: New test. 2018-01-19 Christophe Lyon * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix dg-options and dg-add-options order. * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise. * testsuite/ext/special_functions/conf_hyperg/check_nan.cc: Likewise. * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise. * testsuite/special_functions/01_assoc_laguerre/check_nan.cc: Likewise. * testsuite/special_functions/02_assoc_legendre/check_nan.cc: Likewise. * testsuite/special_functions/03_beta/check_nan.cc: Likewise. * testsuite/special_functions/04_comp_ellint_1/check_nan.cc: Likewise. * testsuite/special_functions/05_comp_ellint_2/check_nan.cc: Likewise. * testsuite/special_functions/06_comp_ellint_3/check_nan.cc: Likewise. * testsuite/special_functions/06_comp_ellint_3/pr66689.cc: Likewise. * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise. * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise. * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise. * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise. * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise. * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise. * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise. * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise. * testsuite/special_functions/14_expint/check_nan.cc: Likewise. * testsuite/special_functions/15_hermite/check_nan.cc: Likewise. * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise. * testsuite/special_functions/17_legendre/check_nan.cc: Likewise. * testsuite/special_functions/18_riemann_zeta/check_nan.cc: Likewise. * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise. * testsuite/special_functions/20_sph_legendre/check_nan.cc: Likewise. * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise. 2018-01-18 Uros Bizjak * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally include linux/types.h when checking linux/random.h header. * config.h.in: Regenerate. * configure: Ditto. * src/c++11/random.cc: Conditionally include linux/types.h. 2018-01-16 Eric Botcazou * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux. 2018-01-16 Jonathan Wakely PR libstdc++/83834 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard pattern with exact match for std::cerr. 2018-01-15 Jonathan Wakely PR libstdc++/83833 * include/bits/random.h (chi_squared_distribution::param): Update gamma distribution parameter. * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New test. PR libstdc++/83830 * include/std/type_traits (has_unique_object_representations_v): Add variable template. * testsuite/20_util/has_unique_object_representations/value.cc: Check variable template. 2018-01-15 Ville Voutilainen Make optional conditionally trivially_{copy,move}_{constructible,assignable} * include/std/optional (_Optional_payload): Fix the comment in the class head and turn into a primary and one specialization. (_Optional_payload::_M_engaged): Strike the NSDMI. (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)): New. (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)): Likewise. (_Optional_payload<_Tp, false>::_M_get): Likewise. (_Optional_payload<_Tp, false>::_M_reset): Likewise. (_Optional_base_impl): Likewise. (_Optional_base): Turn into a primary and three specializations. (optional(nullopt)): Change the base init. * testsuite/20_util/optional/assignment/8.cc: New. * testsuite/20_util/optional/cons/trivial.cc: Likewise. * testsuite/20_util/optional/cons/value_neg.cc: Adjust. 2018-01-15 Jonathan Wakely PR libstdc++/80276 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New. (get_template_arg_list): New. (StdVariantPrinter._template_args): Remove, use get_template_arg_list instead. (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead of strings and regular expressions. (add_one_template_type_printer): Adapt to new TemplateTypePrinter. (FilteringTypePrinter): Add docstring. Match using startswith. Use strip_inline_namespaces instead of strip_versioned_namespace. (add_one_type_printer): Prepend namespace to match argument. (register_type_printers): Add type printers for char16_t and char32_t string types and for types using cxx11 ABI. Update calls to add_one_template_type_printer to provide default argument dicts. * testsuite/libstdc++-prettyprinters/80276.cc: New test. * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for basic_string and basic_string. * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI. 2018-01-14 Andreas Schwab PR libstdc++/81092 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update. 2018-01-13 Tim Shen PR libstdc++/83601 * include/bits/regex.tcc (regex_replace): Fix escaping in sed. * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests. * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests. 2018-01-12 Rainer Orth PR libstdc++/64054 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc: Remove dg-xfail-run-if. 2018-01-10 François Dumont * include/bits/forward_list.h (_Fwd_list_node_base(_Fwd_list_node_base&&)): New. (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New. (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete. (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise. (_Fwd_list_impl()): Add noexcept qualification. (_Fwd_list_impl(const _Node_alloc_type&)): Delete. (_Fwd_list_impl(_Fwd_list_impl&&)): New, default. (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New. (_Fwd_list_base()): Default. (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New. (_Fwd_list_base(_Fwd_list_base&&)): Default. (forward_list<>()): Default. (forward_list<>(forward_list&&)): Default. (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New. (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New. (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters. * include/bits/forward_list.tcc (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use _M_impl._M_head move assignment. (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise. * testsuite/23_containers/forward_list/allocator/default_init.cc: New. 2018-01-09 Jonathan Wakely PR libstdc++/80276 * python/libstdcxx/v6/printers.py (SharedPointerPrinter) (UniquePointerPrinter): Print correct template argument, not type of the pointer. (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup a type. * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of array type. * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and weak_ptr of array types. 2018-01-09 François Dumont PR libstdc++/83709 * include/bits/hashtable_policy.h (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if __first != __last. (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New. (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)): Add false_type parameter. (_Insert_base::insert): Adapt. * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)): Adapt. (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)): Add __n_elt parameter, defaulted to 1. (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash policy _M_need_rehash. (_Hashtable::_M_merge_unique): Pass target number of elements to add to produce only 1 rehash if necessary. * testsuite/23_containers/unordered_map/insert/83709.cc: New. * testsuite/23_containers/unordered_set/insert/83709.cc: New. 2018-01-09 Juraj Oršulić Jonathan Wakely PR libstdc++/59253 (partial) * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator type for pointer stored by shared_ptr, weak_ptr and unique_ptr. (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as children. * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output of unique_ptr printer. * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected output of shared_ptr printer. 2018-01-05 Jonathan Wakely PR libstdc++/83626 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove unnecessary symlink_status call. (remove_all(const path&, error_code&)): Use filesystem::remove. * src/filesystem/std-ops.cc: Likewise. PR libstdc++/83279 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with sendfile. PR libstdc++/83626 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not report an error for ENOENT. (remove_all(const path&)): Fix type of result variable. (remove_all(const path&, error_code&)): Use non-throwing increment for directory iterator. Call POSIX remove directly to avoid redundant calls to symlink_status. Do not report errors for ENOENT. * src/filesystem/std-ops.cc: Likewise. * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing overload. * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise. 2018-01-04 Jonathan Wakely PR libstdc++/83626 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove redundant call to ec.clear(). (remove_all(const path&, error_code&))): Do not return an error for non-existent paths. * src/filesystem/std-ops.cc: Likewise. * testsuite/27_io/filesystem/operations/remove.cc: New test. * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected results for non-existent paths. * testsuite/experimental/filesystem/operations/remove.cc: New test. * testsuite/experimental/filesystem/operations/remove_all.cc: Fix expected results for non-existent paths. * include/bits/fs_ops.h (exists(const path&, error_code&))): Only check status_known once. * include/experimental/bits/fs_ops.h: Likewise. PR libstdc++/83607 * include/std/functional (__is_byte_like): New trait. (__is_std_equal_to): Remove. (__boyer_moore_base_t): Use __is_byte_like instead of __is_std_equal_to. * include/experimental/functional (__is_std_equal_to): Remove. (__boyer_moore_base_t): Use __is_byte_like instead of __is_std_equal_to. * testsuite/20_util/function_objects/83607.cc: New test. 2018-01-03 Ville Voutilainen Protect optional's deduction guide with the feature macro * include/std/optional: Use the feature macro. 2018-01-03 Jakub Jelinek Update copyright years. Copyright (C) 2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.