gcc/libstdc++-v3/testsuite
Jonathan Wakely 98f29f5638 libstdc++: Fix type-erasure in experimental::net::executor (PR 94203)
The _Tgt and _TgtImpl types that implement type-erasure didn't agree on
the virtual interface, so failed as soon as they were instantiated. With
Clang they failed even sooner. The interface was also dependent on
whether RTTI was enabled or not.

This patch fixes the broken virtual functions and makes the type work
without RTTI, by using a pointer to a specialization of a function
template (similar to the approaches in std::function and std::any).

The changes to the virtual functions would be an ABI change, except that
the previous code didn't even compile if instantiated. This is
experimental TS material anyway.

	PR libstdc++/94203
	* include/experimental/executor (executor::executor(Executor)): Call
	make_shared directly instead of _M_create. Create _Tgt1 object.
	(executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
	Call allocate_shared directly instead of _M_create. Create _Tgt2
	object.
	(executor::target_type): Add cast needed for new _Tgt interface.
	(executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
	(executor::_Tgt): Define the same interface whether RTTI is enabled or
	not.
	(executor::_Tgt::target_type, executor::_Tgt::target): Do not use
	std::type_info in the interface.
	(executor::_Tgt::_M_func): Add data member.
	(executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
	(executor::_Tgt1::_S_func): Define function to access target without
	depending on RTTI.
	(executor::_M_create): Remove.
	(operator==, operator!=): Simplify comparisons for executor.
	* include/experimental/socket (is_error_code_enum<socket_errc>):
	Define specialization before use.
	* testsuite/experimental/net/executor/1.cc: New test.
2020-03-18 00:23:39 +00:00
..
17_intro Skip charset.cc tests on *-*-hpux*. 2020-02-29 18:28:40 +00:00
18_support libstdc++: Optimize C++20 comparison category types 2020-02-07 14:09:03 +00:00
19_diagnostics libstdc++: Define operator<=> for <system_error> types 2020-02-20 12:27:48 +00:00
20_util x32 does not support MS ABI, skip testcases that require it. 2020-03-16 14:38:06 +01:00
21_strings libstdc++: allow string_view insertion to work with <iosfwd> (PR 94051) 2020-03-05 16:46:28 +00:00
22_locale
23_containers libstdc++: Change compile-only test to run 2020-03-10 09:47:15 +00:00
24_iterators libstdc++: Change compile-only test to run 2020-03-10 09:47:15 +00:00
25_algorithms libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017) 2020-03-03 22:46:39 -05:00
26_numerics libstdc++: Update the <numeric> synopsis test to latest standard 2020-02-28 15:08:14 -05:00
27_io libstdc++: Handle type-changing path concatenations (PR 94063) 2020-03-09 23:22:57 +00:00
28_regex
29_atomics libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
30_threads libstdc++: Fix call to __glibcxx_rwlock_init (PR 93244) 2020-03-06 12:03:17 +00:00
abi
backward
config
data
decimal
experimental libstdc++: Fix type-erasure in experimental::net::executor (PR 94203) 2020-03-18 00:23:39 +00:00
ext
lib libstdc++: Disable diagnostic URLs in testsuite 2020-02-27 20:26:20 +00:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions
std libstdc++: Add a test that takes the split_view of a non-forward range 2020-03-11 14:56:52 -04:00
tr1 libstdc++: Fix test failure due to -Wnonnull warnings 2020-03-12 11:03:04 +00:00
tr2
util libstdc++: Add a test that takes the split_view of a non-forward range 2020-03-11 14:56:52 -04:00
Makefile.am
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00