is_seq.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. BOOST_PP_VARIADICS version of BOOST_PP_IS_SEQ inspired from
  3. boost/mpl/aux_/preprocessor/is_seq.hpp, original copyrights goes to :
  4. Copyright Paul Mensonides 2003
  5. Copyright Aleksey Gurtovoy 2003-2004
  6. Distributed under the Boost Software License, Version 1.0. (See accompanying
  7. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. ==============================================================================*/
  9. #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PREPROCESSOR_IS_SEQ_HPP
  10. #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PREPROCESSOR_IS_SEQ_HPP
  11. #include <boost/preprocessor/punctuation/paren.hpp>
  12. #include <boost/preprocessor/cat.hpp>
  13. #include <boost/preprocessor/config/config.hpp>
  14. #if BOOST_PP_VARIADICS
  15. #define BOOST_FUSION_PP_IS_SEQ(seq) BOOST_PP_CAT(BOOST_FUSION_PP_IS_SEQ_, \
  16. BOOST_FUSION_PP_IS_SEQ_0 seq BOOST_PP_RPAREN())
  17. #define BOOST_FUSION_PP_IS_SEQ_0(...) \
  18. BOOST_FUSION_PP_IS_SEQ_1(__VA_ARGS__
  19. #define BOOST_FUSION_PP_IS_SEQ_ALWAYS_0(...) \
  20. 0
  21. #define BOOST_FUSION_PP_IS_SEQ_BOOST_FUSION_PP_IS_SEQ_0 \
  22. BOOST_FUSION_PP_IS_SEQ_ALWAYS_0(
  23. #define BOOST_FUSION_PP_IS_SEQ_BOOST_FUSION_PP_IS_SEQ_1(...) \
  24. 1
  25. #endif // BOOST_PP_VARIADICS
  26. #endif