libstdc++: Better requirements checking in Networking TS
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 May 2020 23:59:55 +0000 (00:59 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 20 May 2020 23:59:55 +0000 (00:59 +0100)
commitb780db2ea327f51050d64237e71456b0eacf60e8
treeb7ced8ca5f5066189d37413937e378ecfa55d83a
parentd9d34449bbde21f6092153828d1b6ee73bd6c4c3
libstdc++: Better requirements checking in Networking TS

Define concepts and traits for checking type requirements.

* include/experimental/bits/net.h (__endpoint, __protocol)
(__acceptable_protocol, __inet_protocol): New concepts.
(__detail::__is_endpoint): Move trait from <experimental/socket>.
(__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
traits.
(__endpoint, __protocol, __acceptable_protocol): New variable
templates.
* include/experimental/socket (__is_endpoint): Move to net.h header.
(basic_socket, basic_socket_acceptor): Check requirements.
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/bits/net.h
libstdc++-v3/include/experimental/socket