is_parens_empty.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_PARENS_EMPTY_HPP)
  6. #define BOOST_VMD_IS_PARENS_EMPTY_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/is_empty_tuple.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_PARENS_EMPTY(sequence)
  16. \brief Determines if the sequence is a set of parens with no data.
  17. sequence = a VMD sequence
  18. returns = 1 if the sequence is a set of parens with no data,
  19. else returns 0.
  20. A set of parens with no data may be:
  21. 1) a tuple whose size is a single element which is empty
  22. or
  23. 2) a single element seq whose data is empty
  24. */
  25. #define BOOST_VMD_IS_PARENS_EMPTY(sequence) \
  26. BOOST_VMD_DETAIL_IS_EMPTY_TUPLE(sequence) \
  27. /**/
  28. /** \def BOOST_VMD_IS_PARENS_EMPTY_D(d,sequence)
  29. \brief Determines if the sequence is a set of parens with no data. Re-entrant version.
  30. d = The next available BOOST_PP_WHILE iteration.
  31. sequence = a VMD sequence
  32. returns = 1 if the sequence is a set of parens with no data,
  33. else returns 0.
  34. A set of parens with no data may be:
  35. 1) a tuple whose size is a single element which is empty
  36. or
  37. 2) a single element seq whose data is empty
  38. */
  39. #define BOOST_VMD_IS_PARENS_EMPTY_D(d,sequence) \
  40. BOOST_VMD_DETAIL_IS_EMPTY_TUPLE_D(d,sequence) \
  41. /**/
  42. #endif /* BOOST_PP_VARIADICS */
  43. #endif /* BOOST_VMD_IS_PARENS_EMPTY_HPP */