mirror of
https://github.com/boostorg/describe.git
synced 2026-01-19 04:12:07 +00:00
Add pedantic_enumerators_test
This commit is contained in:
@@ -71,6 +71,9 @@ compile unnamed_namespace_test2.cpp ;
|
||||
run union_test.cpp ;
|
||||
run union_test2.cpp ;
|
||||
|
||||
run pedantic_enumerators_test.cpp
|
||||
: : : <warnings>pedantic ;
|
||||
|
||||
# examples
|
||||
|
||||
obj describe_cxx14 : describe_cxx14.cpp ;
|
||||
|
||||
19
test/pedantic_enumerators_test.cpp
Normal file
19
test/pedantic_enumerators_test.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright 2022 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/describe/enumerators.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
enum E {};
|
||||
|
||||
int main()
|
||||
{
|
||||
#if defined(BOOST_DESCRIBE_CXX11)
|
||||
|
||||
BOOST_TEST_TRAIT_FALSE((boost::describe::has_describe_enumerators<E>));
|
||||
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
Reference in New Issue
Block a user