gcc/libstdc++-v3/testsuite
Jonathan Wakely 06c86a4f21 libstdc++: Fix socket option classes
This fixes some flaws in the socket option types defined in
net::socket_base:

- The constructors were not noexcept.
- The __sockopt_base<T>::value() member function was present
  unconditionally (so was defined for socket_base::linger which is
  incorrect).
- The __socket_crtp<C, T>::operator=(T) assignment operator was not
  noexcept, and was hidden in the derived classes.

Also:

- Use class instead of struct for the socket option types.
- Define the _S_level and _S_name constants as private.
- Declare the __socket_crtp base as a friend.

libstdc++-v3/ChangeLog:

	* include/experimental/bits/net.h (__socket_base): Add
	bool template parameter to allow BooleanSocketOption and
	IntegerSocketOption to have different __socket_base<int>
	base classes.
	(__socket_base<bool>): Adjust base class.
	(__socket_base<int>): Add partial specialization.
	(__socket_crtp::operator=(_Tp)): Add noexcept-specifier.
	* include/experimental/socket (socket_base::broadcast)
	(socket_base::debug, socket_base::do_not_route)
	(socket_base::keep_alive, socket_base::linger)
	(socket_base::out_of_band_inline)
	(socket_base::receive_buffer_size)
	(socket_base::receive_low_watermark)
	(socket_base::reuse_address, socket_base::send_buffer_size)
	(socket_base::send_low_watermark): Add using-declaration for
	__socket_crtp::operator=(_Tp).
	* testsuite/experimental/net/socket/socket_base.cc: Check
	properties of socket option types.
2021-04-26 21:16:21 +01:00
..
17_intro libstdc++: Fix test that fails in C++20 mode [PR 99995] 2021-04-12 11:34:19 +01:00
18_support libstdc++: Move atomic functions to libsupc++ [PR 96657] 2021-04-15 16:56:44 +01:00
19_diagnostics libstdc++: Fix incorrect test for std::error_code comparisons 2021-02-03 15:49:36 +00:00
20_util libstdc++: Reject std::make_shared<T[]> [PR 99006] 2021-04-22 15:49:27 +01:00
21_strings libstdc++: Fix and complete __gnu_debug::basic_string implementation 2021-03-25 21:56:14 +01:00
22_locale Update copyright years. 2021-01-04 10:26:59 +01:00
23_containers libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985] 2021-04-09 13:09:24 +01:00
24_iterators libstdc++: Implement P2259R1 changes [PR95983] 2021-04-20 09:18:50 -04:00
25_algorithms libstdc++: [_GLIBCXX_DEBUG] Fix management of __dp_sign_max_size [PR 99402] 2021-04-09 21:46:35 +02:00
26_numerics libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
27_io libstdc++: Fix filesystem::path construction from COW string [PR 99805] 2021-04-07 16:39:24 +01:00
28_regex Update copyright years. 2021-01-04 10:26:59 +01:00
29_atomics libstdc++: Add workaround for ia32 floating atomics miscompilations [PR100184] 2021-04-22 15:09:58 +02:00
30_threads libstdc++: Fix semaphore to work with system_clock timeouts 2021-04-22 17:35:00 +01:00
abi Update copyright years. 2021-01-04 10:26:59 +01:00
backward Update copyright years. 2021-01-04 10:26:59 +01:00
config Update copyright years. 2021-01-04 10:26:59 +01:00
data
decimal Update copyright years. 2021-01-04 10:26:59 +01:00
experimental libstdc++: Fix socket option classes 2021-04-26 21:16:21 +01:00
ext libstdc++: Suppress more vstring testsuite warnings. [PR 98613] 2021-01-10 18:22:51 -05:00
lib testuite: fix libtdc++ libatomic flags 2021-04-24 11:57:05 -04:00
libstdc++-abi Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-dg libstdc++: Add std::experimental::simd from the Parallelism TS 2 2021-01-27 16:37:26 +00:00
libstdc++-prettyprinters Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-xmethods Update copyright years. 2021-01-04 10:26:59 +01:00
performance Update copyright years. 2021-01-04 10:26:59 +01:00
special_functions Update copyright years. 2021-01-04 10:26:59 +01:00
std libstdc++: Implement P2259R1 changes [PR95983] 2021-04-20 09:18:50 -04:00
tr1 libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
tr2 Update copyright years. 2021-01-04 10:26:59 +01:00
util libstdc++ Simplify definition of net::socket_base constants 2021-04-23 13:54:34 +01:00
Makefile.am libstdc++: Work around test failures using -mno-tree-vrp 2021-02-03 15:49:30 +00:00
Makefile.in libstdc++: Work around test failures using -mno-tree-vrp 2021-02-03 15:49:30 +00:00