is_vmd_seq.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #if !defined(BOOST_VMD_IS_VMD_SEQ_HPP)
  6. #define BOOST_VMD_IS_VMD_SEQ_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/preprocessor/control/iif.hpp>
  10. #include <boost/vmd/identity.hpp>
  11. #include <boost/vmd/is_empty.hpp>
  12. #include <boost/vmd/is_seq.hpp>
  13. /*
  14. The succeeding comments in this file are in doxygen format.
  15. */
  16. /** \file
  17. */
  18. /** \def BOOST_VMD_IS_VMD_SEQ(sequence)
  19. \brief Determines if a sequence is a VMD seq.
  20. The macro checks that the sequence is a VMD seq.
  21. A VMD seq, which may be a Boost PP seq or emptiness, is a superset of a Boost PP seq.
  22. It returns 1 if it is a VMD seq, else if returns 0.
  23. sequence = a possible Boost PP seq
  24. returns = 1 if it a VMD seq, else returns 0.
  25. */
  26. #define BOOST_VMD_IS_VMD_SEQ(sequence) \
  27. BOOST_VMD_IDENTITY_RESULT \
  28. ( \
  29. BOOST_PP_IIF \
  30. ( \
  31. BOOST_VMD_IS_EMPTY(sequence), \
  32. BOOST_VMD_IDENTITY(1), \
  33. BOOST_VMD_IS_SEQ \
  34. ) \
  35. (sequence) \
  36. ) \
  37. /**/
  38. #endif /* BOOST_PP_VARIADICS */
  39. #endif /* BOOST_VMD_IS_VMD_SEQ_HPP */