|
||||
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_LIST_HPP) 0008 #define BOOST_VMD_ASSERT_IS_LIST_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_LIST(sequence) 0024 0025 \brief Asserts that the sequence is a Boost PP list. 0026 0027 The macro checks that the sequence is a Boost PP list. 0028 If it is not a Boost PP list, it forces a compiler error. 0029 0030 The macro normally checks for a Boost PP list 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 list. 0036 0037 @code 0038 0039 returns = Normally the macro returns nothing. 0040 0041 If the sequence is a Boost PP list, 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 list 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 parameter is not a 0051 Boost PP list. 0052 0053 @endcode 0054 0055 */ 0056 0057 /** \def BOOST_VMD_ASSERT_IS_LIST_D(d,sequence) 0058 0059 \brief Asserts that the sequence is a Boost PP list. Re-entrant version. 0060 0061 The macro checks that the sequence is a Boost PP list. 0062 If it is not a Boost PP list, it forces a compiler error. 0063 0064 The macro normally checks for a Boost PP list 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 Boost PP list. 0071 0072 @code 0073 0074 returns = Normally the macro returns nothing. 0075 0076 If the sequence is a Boost PP list, 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 Boost PP list 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 parameter is not a 0086 Boost PP list. 0087 0088 @endcode 0089 0090 */ 0091 0092 #if !BOOST_VMD_ASSERT_DATA 0093 0094 #define BOOST_VMD_ASSERT_IS_LIST(sequence) 0095 #define BOOST_VMD_ASSERT_IS_LIST_D(d,sequence) 0096 0097 #else 0098 0099 #include <boost/vmd/assert.hpp> 0100 #include <boost/vmd/is_list.hpp> 0101 0102 #define BOOST_VMD_ASSERT_IS_LIST(sequence) \ 0103 BOOST_VMD_ASSERT \ 0104 ( \ 0105 BOOST_VMD_IS_LIST(sequence), \ 0106 BOOST_VMD_ASSERT_IS_LIST_ERROR \ 0107 ) \ 0108 /**/ 0109 0110 #define BOOST_VMD_ASSERT_IS_LIST_D(d,sequence) \ 0111 BOOST_VMD_ASSERT \ 0112 ( \ 0113 BOOST_VMD_IS_LIST_D(d,sequence), \ 0114 BOOST_VMD_ASSERT_IS_LIST_ERROR \ 0115 ) \ 0116 /**/ 0117 0118 #endif /* BOOST_VMD_ASSERT_DATA */ 0119 0120 #endif /* BOOST_PP_VARIADICS */ 0121 #endif /* BOOST_VMD_ASSERT_IS_LIST_HPP */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |