epoc32/include/stdapis/boost/mpl/eval_if.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/mpl/eval_if.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,71 @@
     1.4 +
     1.5 +#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED
     1.6 +#define BOOST_MPL_EVAL_IF_HPP_INCLUDED
     1.7 +
     1.8 +// Copyright Aleksey Gurtovoy 2000-2004
     1.9 +//
    1.10 +// Distributed under the Boost Software License, Version 1.0. 
    1.11 +// (See accompanying file LICENSE_1_0.txt or copy at 
    1.12 +// http://www.boost.org/LICENSE_1_0.txt)
    1.13 +//
    1.14 +// See http://www.boost.org/libs/mpl for documentation.
    1.15 +
    1.16 +// $Source: /cvsroot/boost/boost/boost/mpl/eval_if.hpp,v $
    1.17 +// $Date: 2004/11/28 01:54:10 $
    1.18 +// $Revision: 1.3 $
    1.19 +
    1.20 +#include <boost/mpl/if.hpp>
    1.21 +#include <boost/mpl/aux_/na_spec.hpp>
    1.22 +#include <boost/mpl/aux_/lambda_support.hpp>
    1.23 +#include <boost/mpl/aux_/config/msvc.hpp>
    1.24 +#include <boost/mpl/aux_/config/gcc.hpp>
    1.25 +#include <boost/mpl/aux_/config/workaround.hpp>
    1.26 +
    1.27 +namespace boost { namespace mpl {
    1.28 +
    1.29 +template<
    1.30 +      typename BOOST_MPL_AUX_NA_PARAM(C)
    1.31 +    , typename BOOST_MPL_AUX_NA_PARAM(F1)
    1.32 +    , typename BOOST_MPL_AUX_NA_PARAM(F2)
    1.33 +    >
    1.34 +struct eval_if
    1.35 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
    1.36 +     || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
    1.37 +        && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
    1.38 +        )
    1.39 +{
    1.40 +    typedef typename if_<C,F1,F2>::type f_;
    1.41 +    typedef typename f_::type type;
    1.42 +#else
    1.43 +    : if_<C,F1,F2>::type
    1.44 +{
    1.45 +#endif
    1.46 +    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
    1.47 +};
    1.48 +
    1.49 +// (almost) copy & paste in order to save one more 
    1.50 +// recursively nested template instantiation to user
    1.51 +template<
    1.52 +      bool C
    1.53 +    , typename F1
    1.54 +    , typename F2
    1.55 +    >
    1.56 +struct eval_if_c
    1.57 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
    1.58 +     || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
    1.59 +        && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
    1.60 +        )
    1.61 +{
    1.62 +    typedef typename if_c<C,F1,F2>::type f_;
    1.63 +    typedef typename f_::type type;
    1.64 +#else
    1.65 +    : if_c<C,F1,F2>::type
    1.66 +{
    1.67 +#endif
    1.68 +};
    1.69 +
    1.70 +BOOST_MPL_AUX_NA_SPEC(3, eval_if)
    1.71 +
    1.72 +}}
    1.73 +
    1.74 +#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED