diff -r 000000000000 -r e4d67989cc36 ossrv_pub/boost_apis/boost/parameter/binding.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ossrv_pub/boost_apis/boost/parameter/binding.hpp Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,106 @@ +// Copyright David Abrahams 2005. Distributed under the Boost +// Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_PARAMETER_BINDING_DWA200558_HPP +# define BOOST_PARAMETER_BINDING_DWA200558_HPP + +# include +# include +# include +# include +# include +# include + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# include +# endif + +namespace boost { namespace parameter { + +// A metafunction that, given an argument pack, returns the type of +// the parameter identified by the given keyword. If no such +// parameter has been specified, returns Default + +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +struct binding0 +{ + typedef typename mpl::apply_wrap3< + typename Parameters::binding,Keyword,Default,mpl::true_ + >::type type; + + BOOST_MPL_ASSERT_NOT(( + mpl::and_< + is_same + , is_same + > + )); +}; +# endif + +template +# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) +struct binding +# else +struct binding_eti +# endif +{ +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + typedef typename mpl::eval_if< + mpl::is_placeholder + , mpl::identity + , binding0 + >::type type; +# else + typedef typename mpl::apply_wrap3< + typename Parameters::binding,Keyword,Default,mpl::true_ + >::type type; + + BOOST_MPL_ASSERT_NOT(( + mpl::and_< + is_same + , is_same + > + )); +# endif + +# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,binding,(Parameters,Keyword,Default)) +# endif +}; + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +template +struct binding +{ + typedef typename mpl::eval_if< + is_same + , mpl::identity + , binding_eti + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,binding,(Parameters,Keyword,Default)) +}; +# endif + +// A metafunction that, given an argument pack, returns the type of +// the parameter identified by the given keyword. If no such +// parameter has been specified, returns the type returned by invoking +// DefaultFn +template +struct lazy_binding +{ + typedef typename mpl::apply_wrap3< + typename Parameters::binding + , Keyword + , typename aux::result_of0::type + , mpl::true_ + >::type type; +}; + + +}} // namespace boost::parameter + +#endif // BOOST_PARAMETER_BINDING_DWA200558_HPP