test_seq_size.cxx 610 B

1234567891011121314151617181920212223242526272829
  1. // (C) Copyright Edward Diener 2015
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #include <boost/vmd/seq/size.hpp>
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. #define A_SEQ (1)(2)(3)(4)
  11. #define AN_EMPTY_SEQ
  12. BOOST_TEST_EQ(BOOST_VMD_SEQ_SIZE(A_SEQ),4);
  13. BOOST_TEST_EQ(BOOST_VMD_SEQ_SIZE(AN_EMPTY_SEQ),0);
  14. #else
  15. BOOST_ERROR("No variadic macro support");
  16. #endif
  17. return boost::report_errors();
  18. }