+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/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.