gcc/libstdc++-v3/include
Jonathan Wakely 84870b6bb2 Fix std::experimental::shared_ptr SFINAE constraints
* include/experimental/bits/shared_ptr.h
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_Compatible): Just use
	is_convertible for non-array specialization.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::_UniqCompatible): New
	constraint for conversions from unique_ptr.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::__shared_ptr): Constrain.
	(__shared_ptr<__libfund_v1<_Tp, false>, _Lp>::reset): Likewise.
	(__sp_compatible_v): New variable template for trait.
	(__sp_is_constructible): New trait to check shared_ptr constraints.
	(__sp_is_constructible_v): New variable template for trait.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_SafeConv): New
	constraint for construction/reset, using __sp_is_constructible_v.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::_UniqCompatible): New
	constraint for conversions from unique_ptr.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::__shared_ptr): Constrain.
	(__shared_ptr<__libfund_v1<_Tp, true>, _Lp>::reset): Likewise.
	(shared_ptr::_SafeConv): Constraint for checking constructors.
	(shared_ptr(Tp1*), shared_ptr(_Tp1, _Deleter))
	(shared_ptr(_Tp1, _Deleter, _Alloc)): Constrain with _SafeConv.
	(shared_ptr(const weak_ptr<_Tp1>&)): Constrain with _Compatible.
	(shared_ptr(auto_ptr<_Tp1>&&)): Fix, remove TODO.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc:
	Remove tests using invalid conversions.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor_neg.cc:
	New test.
	* testsuite/experimental/memory/shared_ptr/cons/torture.cc: New test.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset.cc: Remove
	tests using invalid conversions.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset_neg.cc: New
	test.
	* testsuite/experimental/memory/shared_ptr/observers/use_count.cc:
	Remove tests using invalid conversions.

From-SVN: r241331
2016-10-19 10:35:03 +01:00
..
backward Update copyright years. 2016-01-04 15:30:50 +01:00
bits PR77990 refactor unique_ptr to encapsulate tuple 2016-10-19 10:34:57 +01:00
c Update copyright years. 2016-01-04 15:30:50 +01:00
c_compatibility Don't define guard macros when doing #include_next in math.h and stdlib.h 2016-02-01 11:13:40 +00:00
c_global libstdc++/77795 Only declare ::gets for C++98 and C++11 2016-09-30 19:28:53 +01:00
c_std libstdc++/77795 Only declare ::gets for C++98 and C++11 2016-09-30 19:28:53 +01:00
debug Implement P0084R2, Emplace return type, for C++17 2016-10-17 13:00:38 +01:00
decimal Update copyright years. 2016-01-04 15:30:50 +01:00
experimental Fix std::experimental::shared_ptr SFINAE constraints 2016-10-19 10:35:03 +01:00
ext Make sure the return value of malloc_allocator::allocate is zero-initialized so... 2016-10-16 16:31:43 +03:00
parallel algo.h: Generalize usage of std::__iterator_category. 2016-09-25 15:23:45 +00:00
precompiled Implement TR29124 C++ special Math Functions. 2016-01-14 18:12:43 +00:00
profile Add C++17 constexpr to debug and profile mode arrays 2016-08-23 16:54:57 +01:00
std PR77998 Remove std:🧵:_Invoker::result_type 2016-10-17 13:23:09 +01:00
tr1 Enable Mathematical Special Functions for C++17 2016-08-03 16:54:13 +01:00
tr2 Update copyright years. 2016-01-04 15:30:50 +01:00
Makefile.am Fix libstdc++ versioned namespace build 2016-10-03 15:35:28 +01:00
Makefile.in Fix libstdc++ versioned namespace build 2016-10-03 15:35:28 +01:00