1 | // Copyright 2020 Peter Dimov. |
---|---|
2 | // Distributed under the Boost Software License, Version 1.0. |
3 | // http://www.boost.org/LICENSE_1_0.txt |
4 | |
5 | #include <boost/system/is_error_condition_enum.hpp> |
6 | #include <boost/core/lightweight_test.hpp> |
7 | |
8 | enum condition |
9 | { |
10 | c1 = 1, |
11 | c2, |
12 | c3 |
13 | }; |
14 | |
15 | namespace boost |
16 | { |
17 | namespace system |
18 | { |
19 | |
20 | template<> struct is_error_condition_enum< ::condition > |
21 | { |
22 | static const bool value = true; |
23 | }; |
24 | |
25 | } |
26 | } |
27 | |
28 | boost::system::error_condition make_error_condition( ::condition e ); |
29 | |
30 | enum not_condition |
31 | { |
32 | }; |
33 | |
34 | int main() |
35 | { |
36 | BOOST_TEST( boost::system::is_error_condition_enum< ::condition >::value ); |
37 | BOOST_TEST( !boost::system::is_error_condition_enum< ::not_condition >::value ); |
38 | |
39 | return boost::report_errors(); |
40 | } |
41 |