sl@0: sl@0: #ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED sl@0: #define BOOST_MPL_EVAL_IF_HPP_INCLUDED sl@0: sl@0: // Copyright Aleksey Gurtovoy 2000-2004 sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. sl@0: // (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: // See http://www.boost.org/libs/mpl for documentation. sl@0: sl@0: // $Source: /cvsroot/boost/boost/boost/mpl/eval_if.hpp,v $ sl@0: // $Date: 2004/11/28 01:54:10 $ sl@0: // $Revision: 1.3 $ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { namespace mpl { sl@0: sl@0: template< sl@0: typename BOOST_MPL_AUX_NA_PARAM(C) sl@0: , typename BOOST_MPL_AUX_NA_PARAM(F1) sl@0: , typename BOOST_MPL_AUX_NA_PARAM(F2) sl@0: > sl@0: struct eval_if sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ sl@0: || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ sl@0: && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ sl@0: ) sl@0: { sl@0: typedef typename if_::type f_; sl@0: typedef typename f_::type type; sl@0: #else sl@0: : if_::type sl@0: { sl@0: #endif sl@0: BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) sl@0: }; sl@0: sl@0: // (almost) copy & paste in order to save one more sl@0: // recursively nested template instantiation to user sl@0: template< sl@0: bool C sl@0: , typename F1 sl@0: , typename F2 sl@0: > sl@0: struct eval_if_c sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ sl@0: || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ sl@0: && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ sl@0: ) sl@0: { sl@0: typedef typename if_c::type f_; sl@0: typedef typename f_::type type; sl@0: #else sl@0: : if_c::type sl@0: { sl@0: #endif sl@0: }; sl@0: sl@0: BOOST_MPL_AUX_NA_SPEC(3, eval_if) sl@0: sl@0: }} sl@0: sl@0: #endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED