Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:38

0001 
0002 //  (C) Copyright Edward Diener 2011-2015
0003 //  Use, modification and distribution are subject to the Boost Software License,
0004 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 //  http://www.boost.org/LICENSE_1_0.txt).
0006 
0007 #if !defined(BOOST_VMD_ASSERT_IS_TUPLE_HPP)
0008 #define BOOST_VMD_ASSERT_IS_TUPLE_HPP
0009 
0010 #include <boost/vmd/detail/setup.hpp>
0011 
0012 #if BOOST_PP_VARIADICS
0013 
0014 /*
0015 
0016   The succeeding comments in this file are in doxygen format.
0017 
0018 */
0019 
0020 /** \file
0021 */
0022 
0023 /** \def BOOST_VMD_ASSERT_IS_TUPLE(sequence)
0024 
0025     \brief Asserts that the sequence is a Boost PP tuple.
0026 
0027     The macro checks that the sequence is a Boost PP tuple.
0028     If it is not a Boost PP tuple, it forces a compiler error.
0029     
0030     The macro normally checks for a Boost PP tuple only in 
0031     debug mode. However an end-user can force the macro 
0032     to check or not check by defining the macro 
0033     BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.
0034 
0035     sequence = a possible Boost PP tuple.
0036 
0037   @code
0038   
0039     returns  = Normally the macro returns nothing. 
0040     
0041                If the sequence is a Boost PP tuple, nothing is 
0042                output.
0043               
0044                For VC++, because there is no sure way of forcing  
0045                a compiler error from within a macro without producing
0046                output, if the sequence is not a Boost PP tuple the 
0047                macro forces a compiler error by outputting invalid C++. 
0048               
0049                For all other compilers a compiler error is forced 
0050                without producing output if the sequence is not a 
0051                Boost PP tuple.
0052               
0053   @endcode
0054   
0055 */
0056 
0057 #if !BOOST_VMD_ASSERT_DATA
0058 
0059 #define BOOST_VMD_ASSERT_IS_TUPLE(sequence)
0060 
0061 #else
0062 
0063 #include <boost/vmd/assert.hpp>
0064 #include <boost/vmd/is_tuple.hpp>
0065 
0066 #define BOOST_VMD_ASSERT_IS_TUPLE(sequence) \
0067    BOOST_VMD_ASSERT \
0068      ( \
0069      BOOST_VMD_IS_TUPLE(sequence), \
0070      BOOST_VMD_ASSERT_IS_TUPLE_ERROR \
0071      ) \
0072 /**/
0073 
0074 #endif /* BOOST_VMD_ASSERT_DATA */
0075 
0076 #endif /* BOOST_PP_VARIADICS */
0077 #endif /* BOOST_VMD_ASSERT_IS_TUPLE_HPP */