PR c++/90490 - fix decltype issues in noexcept-specifier.
[gcc.git] / libstdc++-v3 / ChangeLog
index 7c19741afbda33b9c716633b4a6ed6c0905c6de9..ac98c0d02e7a585275a682e0cb66799396508c1a 100644 (file)
@@ -1,3 +1,396 @@
+2019-06-20  Jonathan Wakely  <jwakely@redhat.com>
+
+       * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
+       stage of bootstrap.
+       * configure: Regenerate.
+
+       * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
+       Qualify calls to __never_valueless.
+
+       * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
+       C++17 working draft.
+
+       * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
+       vector<bool> for test.
+       * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
+
+2019-06-19  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
+       private.
+       (istream_iterator::_M_read()): Do not check stream state before
+       attempting extraction. Set stream pointer to null when extraction
+       fails (P0738R2).
+       (operator==(const istream_iterator&, const istream_iterator&)): Change
+       to be a hidden friend of istream_iterator.
+       (operator!=(const istream_iterator&, const istream_iterator&)):
+       Likewise.
+       (ostream_iterator::ostream_iterator()): Add default constructor.
+       (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
+       addressof.
+       * testsuite/24_iterators/istream_iterator/1.cc: New test.
+       * testsuite/24_iterators/ostream_iterator/1.cc: New test.
+       * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
+       constructor taking a string.
+       * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
+       New test.
+
+2019-06-19  Michael Weghorn  <m.weghorn@posteo.de>
+           Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/90945
+       * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
+       values of type bool for vector<bool> elements.
+       * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
+       * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
+
+2019-06-19  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/90920 partially revert r263433
+       * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
+       (rotate): Remove checks.
+       * testsuite/25_algorithms/rotate/90920.cc: New test.
+
+       * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
+       category used in invocable check.
+       (reduce(Iter, Iter, T)): Pass initial value as rvalue.
+       * testsuite/26_numerics/reduce/2.cc: New test.
+
+2019-06-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/algorithmfwd.h: Change title of doc group.
+       * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
+       P0024R2.
+       * include/bits/stl_numeric.h: Define doc group and add algos to it.
+       * include/std/numeric (__is_random_access_iter): New internal trait.
+       (reduce, transform_reduce, exclusive_scan, inclusive_scan)
+       (transform_exclusive_scan, transform_inclusive_scan): Likewise.
+       * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
+       * testsuite/26_numerics/exclusive_scan/1.cc: New test.
+       * testsuite/26_numerics/inclusive_scan/1.cc: New test.
+       * testsuite/26_numerics/reduce/1.cc: New test.
+       * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
+       * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
+       * testsuite/26_numerics/transform_reduce/1.cc: New test.
+       * testsuite/util/testsuite_iterators.h (test_container::size()): New
+       member function.
+
+       * include/c_global/cstddef (std::byte): Perform arithmetic operations
+       in unsigned int to avoid promotion (LWG 2950).
+
+2019-06-17  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
+       failure on AIX.
+
+       * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
+
+       PR libstdc++/90281 Fix string conversions for filesystem::path
+       * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
+       Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
+       __str_codecvt_in_all to fail for partial conversions and throw on
+       error.
+       [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
+       (path::_Cvt<char8_t>): Add explicit specialization.
+       [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
+       overloads.
+       [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
+       if-constexpr instead of dispatching to _S_wconvert. Use codecvt
+       instead of codecvt_utf8. Use __str_codecvt_in_all and
+       __str_codecvt_out_all.
+       [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
+       codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
+       (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
+       codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
+       with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
+       after converting to UTF-8.
+       (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
+       __str_codecvt_in_all.
+       (path::string): Fix initialization of string types with different
+       allocators.
+       (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
+       codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
+       * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
+       runtime conditions.
+       (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
+       return false for partial conversions.
+       * include/experimental/bits/fs_path.h (u8path):
+       [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
+       [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
+       missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
+       instead of codecvt_utf8. Use __str_codecvt_in_all and
+       __str_codecvt_out_all.
+       [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
+       codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
+       (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
+       codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
+       with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
+       (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
+       __str_codecvt_in_all.
+       (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
+       codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
+       * src/c++17/fs_path.cc (path::_S_convert_loc): Use
+       __str_codecvt_in_all.
+       * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
+       * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
+       * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
+       * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
+       strings and with Unicode characters outside the basic multilingual
+       plane.
+       * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
+       * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
+       * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
+       * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
+       * testsuite/experimental/filesystem/path/native/string.cc: Test with
+       empty strings and with Unicode characters outside the basic
+       multilingual plane.
+
+2019-06-17  François Dumont  <fdumont@gcc.gnu.org>
+           Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
+       (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
+       deallocate node if insertion fails.
+       (_Hashtable::_M_insert_multi_node): Likewise.
+       (_Hashtable::_M_reinsert_node): Pass additional key argument.
+       (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
+       (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
+       (_Hashtable::extract(const_iterator)): Use _M_extract_node.
+       (_Hashtable::extract(const _Key&)): Likewise.
+       (_Hashtable::_M_merge_unique): Pass additional key argument.
+       (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
+       _Scoped_node.
+       (_Hashtable::_M_insert): Likewise.
+       * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
+       (_Hashtable_alloc): Add comments to functions with misleading names.
+
+2019-06-17  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/20_util/bad_function_call/what.cc: Include <string> header
+       for std::string.
+       * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
+       * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
+       header for std::allocator.
+       * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
+       using-declaration for std::size_t.
+       * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
+       Likewise.
+       * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
+       std::istream.
+       * testsuite/23_containers/vector/cons/55977.cc: Likewise.
+       * testsuite/experimental/map/erasure.cc: Include <string> for
+       std::string.
+       * testsuite/experimental/unordered_map/erasure.cc: Likewise.
+
+2019-06-14  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/experimental/type_traits (experimental::nonesuch): Use
+       pragma to disable -Wctor-dtor-privacy warnings.
+       * include/std/type_traits (__is_convertible_helper<From, To, false>)
+       (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
+
+       * include/std/version (__cpp_lib_bind_front): Add missing macro.
+
+2019-06-12  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
+       * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
+       * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
+       * testsuite/25_algorithms/pstl/feature_test.cc: New test.
+
+       * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
+       (variant::emplace): Change static_assert messages from "should be"
+       to "must be".
+       (hash<monostate>::operator()): Remove name of unused parameter.
+
+       * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
+       expression.
+
+       * include/Makefile.am: Add new <bits/charconv.h> header.
+       * include/Makefile.in: Regenerate.
+       * include/bits/basic_string.h (to_string(int), to_string(unsigned))
+       (to_string(long), to_string(unsigned long), to_string(long long))
+       (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
+       * include/bits/charconv.h: New header.
+       (__detail::__to_chars_len): Move here from <charconv>.
+       (__detail::__to_chars_10_impl): New function extracted from
+       __detail::__to_chars_10.
+       * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
+       (__to_chars_unsigned_type): New class template that reuses
+       __make_unsigned_selector_base::__select to pick a type.
+       (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
+       (__detail::__to_chars_len): Move to new header.
+       (__detail::__to_chars_10): Add inline specifier. Move code doing the
+       output to __detail::__to_chars_10_impl and call that.
+       * include/std/version (__cpp_lib_to_chars): Add, but comment out.
+       * testsuite/21_strings/basic_string/numeric_conversions/char/
+       to_string.cc: Fix reference in comment. Remove unused variable.
+       * testsuite/21_strings/basic_string/numeric_conversions/char/
+       to_string_int.cc: New test.
+
+2019-06-09  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       Fix ConstexprIterator requirements tests - No constexpr algorithms!
+       * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
+       Replace copy with hand-rolled loop.
+       * testsuite/23_containers/array/requirements/constexpr_iter.cc:
+       Ditto.
+
+2019-06-08  Edward Smith-Rowland  <3dw4rd@verizon.net>
+
+       Test for C++20 p0858 - ConstexprIterator requirements.
+       * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
+       New test.
+       * testsuite/23_containers/array/requirements/constexpr_iter.cc:
+       New test.
+
+2019-06-07  Thomas Rodgers  <trodgers@redhat.com>
+
+       Rename PSTL macro's consistent with libstdc++ (and llvm upstream
+       project) standards.
+       * include/bits/c++config: Rename all macros of the form __PSTL* to
+       _PSTL*.
+       * include/std/algorithm: Likewise.
+       * include/std/execution: Likewise.
+       * include/std/numeric: Likewise.
+       * include/std/memory: Likewise.
+       * include/pstl/glue_memory_impl.h: Likewise.
+       * include/pstl/numeric_impl.h: Likewise.
+       * include/pstl/glue_memory_defs.h: Likewise.
+       * include/pstl/execution_defs.h: Likewise.
+       * include/pstl/utils.h: Likewise.
+       * include/pstl/algorithm_fwd.h: Likewise.
+       * include/pstl/unseq_backend_simd.h: Likewise.
+       * include/pstl/glue_execution_defs.h: Likewise.
+       * include/pstl/algorithm_impl.h: Likewise.
+       * include/pstl/parallel_impl.h: Likewise.
+       * include/pstl/memory_impl.h: Likewise.
+       * include/pstl/glue_numeric_defs.h: Likewise.
+       * include/pstl/parallel_backend_utils.h: Likewise.
+       * include/pstl/glue_algorithm_defs.h: Likewise.
+       * include/pstl/parallel_backend.h: Likewise.
+       * include/pstl/glue_numeric_impl.h: Likewise.
+       * include/pstl/parallel_backend_tbb.h: Likewise.
+       * include/pstl/numeric_fwd.h: Likewise.
+       * include/pstl/glue_algorithm_impl.h: Likewise.
+       * include/pstl/execution_impl.h: Likewise.
+       * include/pstl/pstl_config.h: Likewise.
+       * testsuite/util/pstl/pstl_test_config.h: Likewise.
+       * testsuite/util/pstl/test_utils.h: Likewise.
+       * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
+       Likewise.
+       * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
+       Likewise.
+       * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
+       Likewise.
+       * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
+       * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
+       * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
+       Likewise.
+       * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
+
+       Rename header guards to be consistent with upstream project's
+       conventions.
+       * include/pstl/glue_memory_impl.h: Rename all macros of the form
+       _PSTL_(.*)_H to _PSTL_\U\1_H.
+       * include/pstl/numeric_impl.h: Likewise.
+       * include/pstl/glue_memory_defs.h: Likewise.
+       * include/pstl/execution_defs.h: Likewise.
+       * include/pstl/utils.h: Likewise.
+       * include/pstl/algorithm_fwd.h: Likewise.
+       * include/pstl/unseq_backend_simd.h: Likewise.
+       * include/pstl/glue_execution_defs.h: Likewise.
+       * include/pstl/algorithm_impl.h: Likewise.
+       * include/pstl/parallel_impl.h: Likewise.
+       * include/pstl/memory_impl.h: Likewise.
+       * include/pstl/glue_numeric_defs.h: Likewise.
+       * include/pstl/parallel_backend_utils.h: Likewise.
+       * include/pstl/glue_algorithm_defs.h: Likewise.
+       * include/pstl/parallel_backend.h: Likewise.
+       * include/pstl/glue_numeric_impl.h: Likewise.
+       * include/pstl/parallel_backend_tbb.h: Likewise.
+       * include/pstl/numeric_fwd.h: Likewise.
+       * include/pstl/glue_algorithm_impl.h: Likewise.
+       * include/pstl/execution_impl.h: Likewise.
+       * include/pstl/pstl_config.h: Likewise.
+       * testsuite/util/pstl/pstl_test_config.h: Likewise.
+
+       Synchronize libstdc++ parallel algorithms with upstream
+       project.
+       * include/pstl/algorithm_fwd.h: Synchronize with
+       upstream PSTL project.
+       * include/pstl/algorithm_impl.h: Likewise.
+       * include/pstl/execution_defs.h: Likewise.
+       * include/pstl/execution_impl.h: Likewise.
+       * include/pstl/glue_algorithm_impl.h: Likewise.
+       * include/pstl/glue_execution_defs.h: Likewise.
+       * include/pstl/numeric_fwd.h: Likewise.
+       * include/pstl/numeric_impl.h: Likewise.
+       * include/pstl/parallel_backend.h: Likewise.
+       * include/pstl/pstl_config.h: Likewise.
+       * include/pstl/unseq_backend_simd.h: Likewise.
+       * include/pstl/parallel_backend_serial.h: New file.
+       * include/Makefile.am (pstl_headers): Add
+       parallel_backend_serial.h.
+       * include/Makefile.in: Regenerate.
+
+       Clean up non-conforming names
+       * include/pstl/algorithm_impl.h (__parallel_set_union_op):
+       Uglfiy copy_range1 and copy_range2
+       (__pattern_walk2_n): Rename local n to __n
+       * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
+       Rename parameter _T to _Tp.
+
+       Integrate non-TBB serial backend support
+       * include/bits/c++config: Adjust TBB detection logic to select serial
+       PSTL backend if no TBB present.
+       * testsuite/utils/pstl/test_utils.h: Remove check for
+       _PSTL_USE_PAR_POLICIES
+       
 2019-06-07  Jonathan Wakely  <jwakely@redhat.com>
 
        * testsuite/24_iterators/container_access.cc: Move dg-options before