06c86a4f21
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. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |