is_seq.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // (C) Copyright Edward Diener 2011-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_SEQ_HPP)
  6. #define BOOST_VMD_IS_SEQ_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/is_seq.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_SEQ(sequence)
  16. \brief Determines if a sequence is a Boost PP seq.
  17. The macro checks that the sequence is a Boost PP seq.
  18. It returns 1 if it is a seq, else if returns 0.
  19. sequence = a possible Boost PP seq
  20. returns = 1 if it a seq, else returns 0.
  21. A single set of parentheses, with a single element,
  22. is parsed as a tuple and not a seq. To be parsed as
  23. a seq the input needs to be more than one consecutive
  24. sets of parentheses, each with a single element of data.
  25. */
  26. #define BOOST_VMD_IS_SEQ(sequence) \
  27. BOOST_VMD_DETAIL_IS_SEQ(sequence) \
  28. /**/
  29. /** \def BOOST_VMD_IS_SEQ_D(d,sequence)
  30. \brief Determines if a sequence is a Boost PP seq. Re-entrant version.
  31. The macro checks that the sequence is a Boost PP seq.
  32. It returns 1 if it is a seq, else if returns 0.
  33. d = The next available BOOST_PP_WHILE iteration. <br/>
  34. sequence = a possible Boost PP seq
  35. returns = 1 if it a seq, else returns 0.
  36. A single set of parentheses, with a single element,
  37. is parsed as a tuple and not a seq. To be parsed as
  38. a seq the input needs to be more than one consecutive
  39. sets of parentheses, each with a single element of data.
  40. */
  41. #define BOOST_VMD_IS_SEQ_D(d,sequence) \
  42. BOOST_VMD_DETAIL_IS_SEQ_D(d,sequence) \
  43. /**/
  44. #endif /* BOOST_PP_VARIADICS */
  45. #endif /* BOOST_VMD_IS_SEQ_HPP */