gcc/libstdc++-v3/testsuite/experimental
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
..
algorithm Resolve ambiguities in std::experimental::sample test 2016-10-14 20:40:18 +01:00
any Fix libstdc++ versioned namespace build 2016-10-03 15:35:28 +01:00
array Avoid #include <functional> in other headers 2016-10-13 17:59:19 +01:00
chrono Adjust testcases for C++17 compatibility 2016-08-17 14:39:05 +01:00
deque 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
filesystem 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
forward_list 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
functional 70564 fix newly-added tests for not_fn 2016-10-05 13:40:31 +01:00
iterator Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
list 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
map 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
memory Fix std::experimental::shared_ptr SFINAE constraints 2016-10-19 10:35:03 +01:00
memory_resource 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
numeric Define std::gcd and std::lcm for C++17 2016-10-03 18:01:10 +01:00
optional Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
propagate_const Avoid #include <functional> in other headers 2016-10-13 17:59:19 +01:00
random Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
ratio Adjust testcases for C++17 compatibility 2016-08-17 14:39:05 +01:00
set 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
string 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
string_view 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
system_error Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
tuple Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
type_erased_allocator Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
type_traits Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
unordered_map 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
unordered_set 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
vector 1.cc: Remove 'test' variables. 2016-10-14 13:50:24 +00:00
feat-cxx14.cc Use dg-do preprocess instead of compile for tests 2016-08-23 11:13:31 +01:00
feat-lib-fund.cc Use dg-do preprocess instead of compile for tests 2016-08-23 11:13:31 +01:00