Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:16

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_TYPE_HPP)
0008 #define BOOST_VMD_ASSERT_IS_TYPE_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_TYPE(sequence)
0024 
0025     \brief Asserts that the sequence is a VMD type.
0026 
0027     The macro checks that the sequence is a VMD type.
0028     If it is not a VMD type, it forces a compiler error.
0029     
0030     The macro normally checks for a VMD type 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 VMD type.
0036 
0037   @code
0038   
0039     returns = Normally the macro returns nothing. 
0040     
0041               If the sequence is a VMD type, 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 VMD type 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               VMD type.
0052     
0053   @endcode
0054   
0055 */
0056 
0057 /** \def BOOST_VMD_ASSERT_IS_TYPE_D(d,sequence)
0058 
0059     \brief Asserts that the sequence is a VMD type. Re-entrant version.
0060 
0061     The macro checks that the sequence is a VMD type.
0062     If it is not a VMD type, it forces a compiler error.
0063     
0064     The macro normally checks for a VMD type only in 
0065     debug mode. However an end-user can force the macro 
0066     to check or not check by defining the macro 
0067     BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.
0068 
0069     d       = The next available BOOST_PP_WHILE iteration. <br/>
0070     sequence = a possible VMD type.
0071 
0072   @code
0073   
0074     returns = Normally the macro returns nothing. 
0075     
0076               If the sequence is a VMD type, nothing is 
0077               output.
0078               
0079               For VC++, because there is no sure way of forcing  
0080               a compiler error from within a macro without producing
0081               output, if the sequence is not a VMD type the 
0082               macro forces a compiler error by outputting invalid C++.
0083               
0084               For all other compilers a compiler error is forced 
0085               without producing output if the sequence is not a 
0086               VMD type.
0087     
0088   @endcode
0089   
0090 */
0091 
0092 #if !BOOST_VMD_ASSERT_DATA
0093 
0094 #define BOOST_VMD_ASSERT_IS_TYPE(sequence)
0095 #define BOOST_VMD_ASSERT_IS_TYPE_D(d,sequence)
0096 
0097 #else
0098 
0099 #include <boost/vmd/assert.hpp>
0100 #include <boost/vmd/is_type.hpp>
0101 
0102 #define BOOST_VMD_ASSERT_IS_TYPE(sequence) \
0103     BOOST_VMD_ASSERT \
0104           ( \
0105           BOOST_VMD_IS_TYPE(sequence), \
0106           BOOST_VMD_IS_TYPE_ASSERT_ERROR \
0107           ) \
0108 /**/
0109 
0110 #define BOOST_VMD_ASSERT_IS_TYPE_D(d,sequence) \
0111     BOOST_VMD_ASSERT \
0112           ( \
0113           BOOST_VMD_IS_TYPE_D(d,sequence), \
0114           BOOST_VMD_IS_TYPE_ASSERT_ERROR \
0115           ) \
0116 /**/
0117 
0118 #endif // !BOOST_VMD_ASSERT_DATA
0119 
0120 #endif /* BOOST_PP_VARIADICS */
0121 #endif /* BOOST_VMD_ASSERT_IS_TYPE_HPP */