diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-04-26 21:16:21 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-04-26 21:16:21 +0100 |
commit | 2e0b1c6ce3afe0670b96444c6b955ce184ed0046 (patch) | |
tree | 491b77ba5e207d3b291eeba854415aec3ca07016 /gcc | |
parent | 06c86a4f210c76a157512a2963e6c31302d161cb (diff) | |
download | gcc-2e0b1c6ce3afe0670b96444c6b955ce184ed0046.zip gcc-2e0b1c6ce3afe0670b96444c6b955ce184ed0046.tar.gz gcc-2e0b1c6ce3afe0670b96444c6b955ce184ed0046.tar.bz2 |
libstdc++: Fix internet socket option classes
Similar to the previous commit, this fixes various problems with the
socket options classes in the <internet> header:
- 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.
- The MulticastSocketOptions incorrectly used a union, incorrectly
defined resize and const data() member functions, and their
constructors were unimplemented.
Also, where appropriate:
- 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/internet (tcp::no_delay, v6_only)
(unicast::hops, multicast::hops, multicast::enable_loopback):
Change access of base class and static data members. Add
using-declaration for __socket_crtp::operator=(_Tp).
(multicast::__mcastopt): New type.
(multicast::join_group, multicast::leave_group): Derive from
__mcastopt for common implementation.
* include/experimental/socket: Add comment.
* testsuite/experimental/net/internet/socket/opt.cc: New test.
* testsuite/experimental/net/socket/socket_base.cc: Check for
protected constructor/destructor of socket_base. Check for
explicit constructors of socket option classes.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions