]>
Commit | Line | Data |
---|---|---|
83ffe9cd | 1 | // Copyright (C) 2015-2023 Free Software Foundation, Inc. |
e5989e71 JW |
2 | // |
3 | // This file is part of the GNU ISO C++ Library. This library is free | |
4 | // software; you can redistribute it and/or modify it under the | |
5 | // terms of the GNU General Public License as published by the | |
6 | // Free Software Foundation; either version 3, or (at your option) | |
7 | // any later version. | |
8 | ||
9 | // This library is distributed in the hope that it will be useful, | |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | // GNU General Public License for more details. | |
13 | ||
14 | // You should have received a copy of the GNU General Public License along | |
15 | // with this library; see the file COPYING3. If not see | |
16 | // <http://www.gnu.org/licenses/>. | |
17 | ||
49adc066 | 18 | // { dg-do compile { target c++14 } } |
57028ff2 | 19 | // { dg-require-effective-target net_ts_ip } |
630f2da9 | 20 | // { dg-add-options net_ts } |
e5989e71 JW |
21 | |
22 | #include <experimental/internet> | |
49adc066 | 23 | #include <testsuite_common_types.h> |
e5989e71 JW |
24 | #include <testsuite_hooks.h> |
25 | ||
49adc066 | 26 | using std::experimental::net::ip::resolver_base; |
e5989e71 | 27 | |
49adc066 JW |
28 | static_assert( __gnu_test::test_bitmask_values({ |
29 | resolver_base::passive, | |
30 | resolver_base::canonical_name, | |
31 | resolver_base::numeric_host, | |
cbe0bca4 | 32 | #ifdef AI_NUMERICSERV |
49adc066 | 33 | resolver_base::numeric_service, |
cbe0bca4 | 34 | #endif |
cd67d138 | 35 | #ifdef AI_V4MAPPED |
49adc066 | 36 | resolver_base::v4_mapped, |
cd67d138 JW |
37 | #endif |
38 | #ifdef AI_ALL | |
49adc066 | 39 | resolver_base::all_matching, |
cd67d138 JW |
40 | #endif |
41 | #ifdef AI_ADDRCONFIG | |
49adc066 | 42 | resolver_base::address_configured |
cd67d138 | 43 | #endif |
49adc066 JW |
44 | }), "each bitmask element is distinct" ); |
45 | ||
46 | static_assert( ! std::is_default_constructible<resolver_base>(), "protected" ); | |
47 | static_assert( ! std::is_destructible<resolver_base>(), "protected" ); | |
e5989e71 | 48 | |
49adc066 JW |
49 | struct Res : resolver_base { }; |
50 | static_assert( std::is_default_constructible<Res>(), "" ); | |
51 | static_assert( std::is_destructible<Res>(), "" ); |