File indexing completed on 2024-11-15 09:18:33
0001
0002 #ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED
0003 #define BOOST_MPL_EVAL_IF_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/if.hpp>
0018 #include <boost/mpl/aux_/na_spec.hpp>
0019 #include <boost/mpl/aux_/lambda_support.hpp>
0020 #include <boost/mpl/aux_/config/msvc.hpp>
0021 #include <boost/mpl/aux_/config/gcc.hpp>
0022 #include <boost/mpl/aux_/config/workaround.hpp>
0023
0024 namespace boost { namespace mpl {
0025
0026 template<
0027 typename BOOST_MPL_AUX_NA_PARAM(C)
0028 , typename BOOST_MPL_AUX_NA_PARAM(F1)
0029 , typename BOOST_MPL_AUX_NA_PARAM(F2)
0030 >
0031 struct eval_if
0032 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
0033 || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
0034 && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
0035 )
0036 {
0037 typedef typename if_<C,F1,F2>::type f_;
0038 typedef typename f_::type type;
0039 #else
0040 : if_<C,F1,F2>::type
0041 {
0042 #endif
0043 BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
0044 };
0045
0046
0047
0048 template<
0049 bool C
0050 , typename F1
0051 , typename F2
0052 >
0053 struct eval_if_c
0054 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
0055 || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
0056 && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
0057 )
0058 {
0059 typedef typename if_c<C,F1,F2>::type f_;
0060 typedef typename f_::type type;
0061 #else
0062 : if_c<C,F1,F2>::type
0063 {
0064 #endif
0065 };
0066
0067 BOOST_MPL_AUX_NA_SPEC(3, eval_if)
0068
0069 }}
0070
0071 #endif