LWG 2989 hide path iostream operators from normal lookup
[gcc.git] / libstdc++-v3 / ChangeLog
index 2bfda083ee3eb517a04170ba00e3047b5de7f328..0b81f047a178cb8d25a78557bc011300938fc247 100644 (file)
@@ -1,5 +1,150 @@
+2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       LWG 2989 hide path iostream operators from normal lookup
+       * include/bits/fs_path.h (operator<<, operator>>): Define inline as
+       friends.
+       * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
+
+       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.
+
+2018-06-18  Maya Rashish  <coypu@sdf.org>
+
+       * crossconfig.m4: Handle OpenBSD just like NetBSD.
+       * configure: Rebuilt.
+
+2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
+
+       P0754R2 <version> header
+       * include/Makefile.am: Add new header.
+       * include/Makefile.in: Regenerate.
+       * include/bits/c++config: Change doxygen comment to suggest <version>
+       instead of <iosfwd>.
+       * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
+       unconditionally.  Add C++17 and C++20 headers.
+       * include/std/version: New header.
+       * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
+       * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
+       * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
+       * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
+       * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
+       * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
+       * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
+       New.
+       * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
+       * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
+       * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
+       * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
+       * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
+       * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
+       * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
+       New.
+       * testsuite/18_support/headers/version/macros.cc: New.
+       * testsuite/18_support/headers/version/macros.cc: New.
+
+       * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
+       enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
+       symlink.
+       * config.h.in: Regenerate.
+       * configure: Regenerate.
+       * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
+
+       LWG 3035. std::allocator's constructors should be constexpr
+       * include/bits/allocator.h (allocator): Add constexpr to constructors
+       for C++2a. Replace dynamic exception specifications with NOTHROW
+       macro.
+       (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
+       NOTHROW.
+       * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
+       * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
+       to constructors for C++2a.
+       * include/ext/new_allocator.h (new_allocator): Likewise.
+
+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.
+
+2018-06-15  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/86169
+       * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
+       (basic_string::data()): Unshare string.
+       * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
+       New.
+
+       * include/std/string_view (basic_string_view(const CharT*)): Remove
+       check for null pointer and add nonnull attribute.
+       (compare(const CharT*), compare(size_type, size_type, const CharT*))
+       (find(const CharT*, size_type), rfind(const CharT*, size_type))
+       (find_first_of(const CharT*, size_type))
+       (find_last_of(const CharT*, size_type))
+       (find_first_not_of(const CharT*, size_type))
+       (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
+       * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
+       * testsuite/21_strings/basic_string_view/operations/compare/char/
+       nonnull.cc: New.
+       * testsuite/21_strings/basic_string_view/operations/find/char/
+       nonnull.cc: New.
+       * testsuite/21_strings/basic_string_view/operations/rfind/char/
+       nonnull.cc: New.
+
+       PR libstdc++/86168
+       * include/bits/random.h (random_device(const string&)): Remove
+       default argument.
+
+       * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
+       define for C++17 and above.
+
+       LWG 2993 reference_wrapper<T> conversion from T&&
+       * doc/xml/manual/intro.xml: Document LWG 2993 change.
+       * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
+       (reference_wrapper(_Tp&&)): Remove.
+       (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
+       template.
+       (reference_wrapper): Add deduction guide.
+       * testsuite/20_util/reference_wrapper/deduction.cc: New.
+       * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
+
+       LWG 3039 Unnecessary decay in thread and packaged_task
+       * include/std/future (__constrain_pkgdtask): Replace with ...
+       (packaged_task::__not_same): New alias template, using
+       __remove_cvref_t instead of decay.
+       * include/std/thread (thread::__not_same): Add comment.
+
 2018-06-14  Jonathan Wakely  <jwakely@redhat.com>
 
+       LWG 3075 basic_string needs deduction guides from basic_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.
+
+       LWG 3074 make scalar types non-deduced in valarray non-member functions
+       * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
+       scalar parameters to be a non-deduced context.
+       * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
+       whitespace.
+       * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
+       * testsuite/26_numerics/valarray/transcend.cc: New.
+
        * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
        Move back to <utility>.
        * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):