]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/describe/test/pp_is_empty_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / describe / test / pp_is_empty_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
4
5 #include <boost/describe/detail/pp_utilities.hpp>
6 #include <boost/describe/detail/config.hpp>
7 #include <boost/core/lightweight_test.hpp>
8
9 #if !defined(BOOST_DESCRIBE_CXX11)
10
11 #include <boost/config/pragma_message.hpp>
12
13 BOOST_PRAGMA_MESSAGE("Skipping test because C++11 is not available")
14 int main() {}
15
16 #else
17
18 #define S(x) S2(x)
19 #define S2(x) #x
20
21 #if defined(_MSC_VER)
22 # pragma warning(disable: 4003) // not enough arguments for macro invocation
23 #endif
24
25 char const * s1 = S(BOOST_DESCRIBE_PP_IS_EMPTY());
26 char const * s2 = S(BOOST_DESCRIBE_PP_IS_EMPTY(x));
27 char const * s3 = S(BOOST_DESCRIBE_PP_IS_EMPTY(() x));
28 char const * s4 = S(BOOST_DESCRIBE_PP_IS_EMPTY((a, b) x));
29
30 int main()
31 {
32 BOOST_TEST_CSTR_EQ( s1, "1" );
33 BOOST_TEST_CSTR_EQ( s2, "0" );
34 BOOST_TEST_CSTR_EQ( s3, "0" );
35 BOOST_TEST_CSTR_EQ( s4, "0" );
36
37 return boost::report_errors();
38 }
39
40 #endif // !defined(BOOST_DESCRIBE_CXX11)