]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/describe/test/trailing_comma_test.cpp
1 // Copyright 2021 Peter Dimov
2 // Distributed under the Boost Software License, Version 1.0.
3 // https://www.boost.org/LICENSE_1_0.txt
5 #include <boost/describe/enumerators.hpp>
6 #include <boost/describe/enum.hpp>
7 #include <boost/core/lightweight_test.hpp>
10 # pragma warning(disable: 4003) // not enough arguments for macro invocation
13 enum E1
{ a1
, b1
, c1
, };
14 BOOST_DESCRIBE_ENUM(E1
, a1
, b1
, c1
, )
16 BOOST_DEFINE_ENUM(E2
, a2
, b2
, c2
, )
18 #if !defined(BOOST_DESCRIBE_CXX14)
20 #include <boost/config/pragma_message.hpp>
22 BOOST_PRAGMA_MESSAGE("Skipping test because C++14 is not available")
27 #include <boost/mp11.hpp>
28 using namespace boost::mp11
;
33 using D1
= boost::describe::describe_enumerators
<E1
>;
34 BOOST_TEST_EQ( mp_size
<D1
>::value
, 3 );
38 using D2
= boost::describe::describe_enumerators
<E2
>;
39 BOOST_TEST_EQ( mp_size
<D2
>::value
, 3 );
42 return boost::report_errors();
45 #endif // !defined(BOOST_DESCRIBE_CXX14)