1// Copyright 2021 Peter Dimov
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/describe/enumerators.hpp>
6#include <boost/describe/enum.hpp>
7#include <boost/core/lightweight_test.hpp>
8
9enum E1 {};
10BOOST_DESCRIBE_ENUM(E1)
11
12BOOST_DEFINE_ENUM(E2)
13
14#if !defined(BOOST_DESCRIBE_CXX14)
15
16#include <boost/config/pragma_message.hpp>
17
18BOOST_PRAGMA_MESSAGE("Skipping test because C++14 is not available")
19int main() {}
20
21#else
22
23#include <boost/mp11.hpp>
24using namespace boost::mp11;
25
26int main()
27{
28 {
29 using D1 = boost::describe::describe_enumerators<E1>;
30 BOOST_TEST_EQ( mp_size<D1>::value, 0 );
31 }
32
33 {
34 using D2 = boost::describe::describe_enumerators<E2>;
35 BOOST_TEST_EQ( mp_size<D2>::value, 0 );
36 }
37
38 return boost::report_errors();
39}
40
41#endif // !defined(BOOST_DESCRIBE_CXX14)
42

source code of boost/libs/describe/test/empty_enum_test.cpp