2 // (C) Copyright Edward Diener 2011-2015
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
7 #if !defined(BOOST_VMD_ASSERT_IS_TUPLE_HPP)
8 #define BOOST_VMD_ASSERT_IS_TUPLE_HPP
10 #include <boost/vmd/detail/setup.hpp>
12 #if BOOST_PP_VARIADICS
16 The succeeding comments in this file are in doxygen format.
23 /** \def BOOST_VMD_ASSERT_IS_TUPLE(sequence)
25 \brief Asserts that the sequence is a Boost PP tuple.
27 The macro checks that the sequence is a Boost PP tuple.
28 If it is not a Boost PP tuple, it forces a compiler error.
30 The macro normally checks for a Boost PP tuple only in
31 debug mode. However an end-user can force the macro
32 to check or not check by defining the macro
33 BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.
35 sequence = a possible Boost PP tuple.
37 returns = Normally the macro returns nothing.
39 If the sequence is a Boost PP tuple, nothing is
42 For VC++, because there is no sure way of forcing
43 a compiler error from within a macro without producing
44 output, if the sequence is not a Boost PP tuple the
45 macro forces a compiler error by outputting invalid C++.
47 For all other compilers a compiler error is forced
48 without producing output if the sequence is not a
53 #if !BOOST_VMD_ASSERT_DATA
55 #define BOOST_VMD_ASSERT_IS_TUPLE(sequence)
59 #include <boost/vmd/assert.hpp>
60 #include <boost/vmd/is_tuple.hpp>
62 #define BOOST_VMD_ASSERT_IS_TUPLE(sequence) \
65 BOOST_VMD_IS_TUPLE(sequence), \
66 BOOST_VMD_ASSERT_IS_TUPLE_ERROR \
70 #endif /* BOOST_VMD_ASSERT_DATA */
72 #endif /* BOOST_PP_VARIADICS */
73 #endif /* BOOST_VMD_ASSERT_IS_TUPLE_HPP */