]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/vmd/test/test_assert_is_empty.cxx
2 // (C) Copyright Edward Diener 2011-2015
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
7 #include <boost/vmd/assert_is_empty.hpp>
8 #include <boost/preprocessor/facilities/empty.hpp>
9 #include <boost/detail/lightweight_test.hpp>
14 #if BOOST_PP_VARIADICS
17 #define OBJECT OBJECT2
19 #define FUNC(x) FUNC2(x)
22 BOOST_VMD_ASSERT_IS_EMPTY(BOOST_PP_EMPTY())
23 BOOST_VMD_ASSERT_IS_EMPTY(DATA
BOOST_PP_EMPTY())
24 BOOST_VMD_ASSERT_IS_EMPTY(OBJECT
BOOST_PP_EMPTY())
25 BOOST_VMD_ASSERT_IS_EMPTY(FUNC(z
) BOOST_PP_EMPTY())
30 #define FUNC_GEN2(x) ()
31 #define FUNC_GEN3(x,y) ()
33 /* This shows that VC++ does not work correctly in these cases. */
35 BOOST_VMD_ASSERT_IS_EMPTY(FUNC_GEN
) /* This incorrectly does not assert */
36 BOOST_VMD_ASSERT_IS_EMPTY(FUNC_GEN2
) /* This incorrectly does not assert */
37 BOOST_VMD_ASSERT_IS_EMPTY(FUNC_GEN3
) /* This should produce a compiler error but does not and does not assert */
39 #endif /* BOOST_VMD_MSVC */
45 #endif /* BOOST_PP_VARIADICS */
47 return boost::report_errors();