is_multi.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_MULTI_HPP)
  6. #define BOOST_VMD_IS_MULTI_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/sequence_arity.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_MULTI(sequence)
  16. \brief Determines if the sequence has more than one element, referred to as a multi-element sequence.
  17. sequence = a sequence
  18. returns = 1 if the sequence is a multi-element sequence, else returns 0.
  19. If the size of a sequence is known it is faster comparing that size to be greater
  20. than one to find out if the sequence is multi-element. But if the size of the
  21. sequence is not known it is faster calling this macro than getting the size and
  22. doing the previously mentioned comparison in order to determine if the sequence
  23. is multi-element or not.
  24. */
  25. #define BOOST_VMD_IS_MULTI(sequence) \
  26. BOOST_VMD_DETAIL_IS_MULTI(sequence) \
  27. /**/
  28. /** \def BOOST_VMD_IS_MULTI_D(d,sequence)
  29. \brief Determines if the sequence has more than one element, referred to as a multi-element sequence.
  30. d = The next available BOOST_PP_WHILE iteration.
  31. sequence = a sequence
  32. returns = 1 if the sequence is a multi-element sequence, else returns 0.
  33. If the size of a sequence is known it is faster comparing that size to be greater
  34. than one to find out if the sequence is multi-element. But if the size of the
  35. sequence is not known it is faster calling this macro than getting the size and
  36. doing the previously mentioned comparison in order to determine if the sequence
  37. is multi-element or not.
  38. */
  39. #define BOOST_VMD_IS_MULTI_D(d,sequence) \
  40. BOOST_VMD_DETAIL_IS_MULTI_D(d,sequence) \
  41. /**/
  42. #endif /* BOOST_PP_VARIADICS */
  43. #endif /* BOOST_VMD_IS_MULTI_HPP */