gcc/libstdc++-v3/testsuite/experimental
Jonathan Wakely f3070dab7a Make std::enable_shared_from_this cope with ambiguity
* 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[]>.

From-SVN: r241353
2016-10-19 21:13:14 +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 Make std::enable_shared_from_this cope with ambiguity 2016-10-19 21:13:14 +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