]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/ChangeLog
Split <functional> into smaller pieces
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
index f2a143ea1066c14aab726a0e5a3d9729323e8d50..51e9653d5219e28eb7aebaa52991bd2694a448ce 100644 (file)
@@ -1,5 +1,167 @@
+2016-10-21  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/Makefile.am: Add <bits/refwrap.h> and <bits/std_function.h>.
+       Order alphabetically.
+       * include/Makefile.in: Regenerate.
+       * include/bits/refwrap.h: New header.
+       (_Maybe_get_result_type,_Weak_result_type_impl, _Weak_result_type)
+       (_Reference_wrapper_base_impl, _Reference_wrapper_base)
+       (reference_wrapper, ref, cref): Move here from <functional>.
+       * include/bits/shared_ptr_base.h: Include <bits/refwrap.h> and
+       <bits/stl_function.h> instead of <functional>.
+       * include/bits/std_function.h: New header.
+       (_Maybe_unary_or_binary_function, bad_function_call)
+       (__is_location_invariant, _Nocopy_types, _Any_data)
+       (_Simple_type_wrapper, _Function_base, _Function_handler, function):
+       Move here from <functional>.
+       * include/bits/unique_ptr.h: Include <bits/stl_function.h>.
+       * include/std/functional: Include new headers and move components to
+       them.
+       * include/std/future: Include <bits/std_function.h> instead of
+       <functional>.
+       * include/std/mutex: Likewise.
+       * include/std/regex: Likewise.
+       * src/c++11/compatibility-thread-c++0x.cc: Include <functional>.
+       * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
+       * testsuite/20_util/default_delete/void_neg.cc: Likewise.
+       * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
+       lines.
+       * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
+       * testsuite/30_threads/packaged_task/49668.cc: Include <functional>.
+
+       * libsupc++/exception_ptr.h (make_exception_ptr): Qualify new.
+       * testsuite/18_support/exception_ptr/make_exception_ptr_2.cc: New
+       test.
+
+2016-10-20  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&))
+       (shared_ptr(auto_ptr&&)): Adjust template parameter lists.
+       * include/bits/shared_ptr.h (__sp_compatible_with)
+       (__sp_is_constructible): New helper traits for shared_ptr.
+       (shared_ptr::_Convertible): Replace with _Constructible.
+       (shared_ptr::_Constructible, shared_ptr::_Assignable): Forward checks
+       to base class.
+       (shared_ptr::shared_ptr, shared_ptr::operator=): Constrain template
+       with _Constructible and _Assignable.
+       (shared_ptr::shared_ptr(shared_ptr<_Tp1>, _Tp*)): Use element_type
+       instead of _Tp.
+       (operator<): Likewise.
+       (operator>): Define in terms of operator<.
+       (static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
+       element_type instead of _Tp.
+       (reinterpret_pointer_cast): Define for C++17.
+       (weak_ptr::_Convertible): Replace with _Constructible.
+       (weak_ptr::_Constructible, weak_ptr::_Assignable): Forward checks
+       to base class.
+       (weak_ptr::weak_ptr, weak_ptr::operator=): Constrain templates
+       with _Constructible and _Assignable.
+       * include/bits/shared_ptr_base.h (__shared_ptr::_Convertible): Replace
+       with _Compatible.
+       (__shared_ptr::_SafeConv): New constraint for incoming raw pointers.
+       (__shared_ptr::_Compatible): New constraint for converting from
+       other types of shared_ptr and weak_ptr.
+       (__shared_ptr::_Assignable): Define in terms of _Compatible.
+       (__shared_ptr::_UniqCompatible, __shared_ptr::_UniqAssignable): New
+       constraints for converting from unique_ptr.
+       (__shared_ptr::__shared_ptr, __shared_ptr::operator=): Constrain
+       template with _SaveConf, _Compatible and _Assignable. Remove
+       __glibcxx_function_requires concept checks. Add static assertion for
+       deleter expression being well-formed.
+       (__shared_ptr::__shared_ptr(__shared_ptr<_Tp1>, _Tp*))
+       (__shared_ptr::operator*, __shared_ptr::operator->)
+       (__shared_ptr::get, __shared_ptr::_M_ptr): Use element_type instead
+       of _Tp.
+       (operator<): Likewise.
+       (operator>): Define in terms of operator<.
+       (static_pointer_cast, const_pointer_cast, dynamic_pointer_cast): Use
+       element_type instead of _Tp.
+       (reinterpret_pointer_cast): Define for C++17.
+       (weak_ptr::_Convertible): Replace with _Compatible.
+       (weak_ptr::_Compatible, weak_ptr::_Assignable): New constraints for
+       conversions from other types of weak_ptr and shared_ptr.
+       (__weak_ptr::__weak_ptr, __weak_ptr::operator=): Constrain templates
+       with _Constructible and _Assignable.
+       (__weak_ptr::_M_ptr): Use element_type instead of _Tp.
+       * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Adjust
+       dg-error pattern.
+       * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Test conversions.
+       * testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
+       * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
+       * testsuite/20_util/shared_ptr/casts/reinterpret.cc: New test.
+
+2016-10-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
+
+       Do the operator= SFINAE in the return type for optional,
+       not in the template parameters.
+       * include/std/optional (operator=(_Up&&)): Move SFINAE
+       from template parameters to the return type.
+       (operator=(const optional<_Up>&)): Likewise.
+       (operator=(optional<_Up>&&)): Likewise.
+
+2016-10-20  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/allocator.h: Remove trailing whitespace, tab-indent.
+       * include/ext/new_allocator.h: Likewise.
+
+       PR libstdc++/78052
+       * include/bits/allocator.h (allocator<void>::construct)
+       (allocator<void>::destroy): Define.
+       * testsuite/20_util/allocator/void.cc: New test.
+
+       * testsuite/20_util/enable_shared_from_this/56383.cc: Add tests for
+       additional ambiguous cases.
+
 2016-10-19  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/backward/auto_ptr.h (__shared_ptr(auto_ptr&&)): Call
+       _M_enable_shared_from_this_with instead of
+       __enable_shared_from_this_helper.
+       * include/bits/shared_ptr.h (__enable_shared_from_this_helper):
+       Remove overload for std::enable_shared_from_this..
+       (__enable_shared_from_this_base): Define friend function to select a
+       std::enable_shared_from_this base class.
+       * include/bits/shared_ptr_base.h (__enable_shared_from_this_helper):
+       Remove all overloads.
+       (__shared_ptr): Change all relevant constructors to call
+       _M_enable_shared_from_this_with instead of
+       __enable_shared_from_this_helper.
+       (__shared_ptr::__efst_base_t, __shared_ptr::__has_efst_base): Helpers
+       to detect accessible and unambiguous enable_shared_from_this bases.
+       (__shared_ptr::_M_enable_shared_from_this_with): New function to
+       replace __enable_shared_from_this_helper overloads.
+       (__enable_shared_from_this_helper): Remove overload for
+       std::__enable_shared_from_this.
+       (__enable_shared_from_this_base): Define friend function to select a
+       std::__enable_shared_from_this base class.
+       * include/experimental/bits/shared_ptr.h (experimental::shared_ptr):
+       Change relevant constructors to call _M_enable_shared_from_this_with.
+       (experimental::shared_ptr::__efst_base_t)
+       (experimental::shared_ptr::__has_efst_base): Helpers to detect
+       accessible and unambiguous enable_shared_from_this bases.
+       (experimental::shared_ptr::_M_enable_shared_from_this_with): Define.
+       (experimental::__enable_shared_from_this_helper): Remove overload for
+       std::experimental::enable_shared_from_this.
+       (experimental::__expt_enable_shared_from_this_base): Define friend
+       function to select a std::experimental::enable_shared_from_this base.
+       * testsuite/experimental/memory/shared_ptr/cons/
+       enable_shared_from_this.cc: New test.
+       * testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
+       Adjust expected behaviour for shared_ptr<A[]>.
+
+       * include/debug/vector (__gnu_debug::vector::emplace_back): Fix return
+       type.
+
+       * include/backward/auto_ptr.h (dauto_ptr): Correct comment about
+       conversions from auto_ptr<Derived> rvalues to auto_ptr<Base>.
+       * testsuite/20_util/auto_ptr/assign_neg.cc: Remove redundant dg-error
+       directives that only match notes, not errors.
+
+       * testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
+       Add tests for valid and invalid conversions.
+       * testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc:
+       Likewise.
+
        * testsuite/20_util/unique_ptr/cons/cv_qual.cc: Move negative tests
        to new file.
        * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: New file.  Fix
        * include/std/future: Include <functional>.
        * include/std/memory: Do not include <functional>.
        * include/std/mutex: [_GLIBCXX_HAVE_TLS]: Likewise.
+       * src/c++11/compatibility-thread-c++0x.cc: Include <functional>.
        * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
        missing includes.
        * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.