epoc32/include/stdapis/boost/utility/result_of.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/utility/result_of.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,66 @@
     1.4 +// Boost result_of library
     1.5 +
     1.6 +//  Copyright Douglas Gregor 2004. Use, modification and
     1.7 +//  distribution is subject to the Boost Software License, Version
     1.8 +//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
     1.9 +//  http://www.boost.org/LICENSE_1_0.txt)
    1.10 +
    1.11 +// For more information, see http://www.boost.org/libs/utility
    1.12 +#ifndef BOOST_RESULT_OF_HPP
    1.13 +#define BOOST_RESULT_OF_HPP
    1.14 +
    1.15 +#include <boost/config.hpp>
    1.16 +#include <boost/type_traits/ice.hpp>
    1.17 +#include <boost/type.hpp>
    1.18 +#include <boost/preprocessor.hpp>
    1.19 +#include <boost/detail/workaround.hpp>
    1.20 +#include <boost/mpl/has_xxx.hpp>
    1.21 +
    1.22 +#ifndef BOOST_RESULT_OF_NUM_ARGS
    1.23 +#  define BOOST_RESULT_OF_NUM_ARGS 10
    1.24 +#endif
    1.25 +
    1.26 +namespace boost {
    1.27 +
    1.28 +template<typename F> struct result_of;
    1.29 +
    1.30 +#if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    1.31 +namespace detail {
    1.32 +
    1.33 +BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
    1.34 +
    1.35 +template<typename F, typename FArgs, bool HasResultType> struct get_result_of;
    1.36 +
    1.37 +template<typename F, typename FArgs>
    1.38 +struct get_result_of<F, FArgs, true>
    1.39 +{
    1.40 +  typedef typename F::result_type type;
    1.41 +};
    1.42 +
    1.43 +template<typename F, typename FArgs>
    1.44 +struct get_result_of<F, FArgs, false>
    1.45 +{
    1.46 +  typedef typename F::template result<FArgs>::type type;
    1.47 +};
    1.48 +
    1.49 +template<typename F>
    1.50 +struct get_result_of<F, F(void), false>
    1.51 +{
    1.52 +  typedef void type;
    1.53 +};
    1.54 +
    1.55 +template<typename F, typename FArgs>
    1.56 +struct result_of : get_result_of<F, FArgs, (has_result_type<F>::value)> {};
    1.57 +
    1.58 +} // end namespace detail
    1.59 +
    1.60 +#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,<boost/utility/detail/result_of_iterate.hpp>))
    1.61 +#include BOOST_PP_ITERATE()
    1.62 +
    1.63 +#else
    1.64 +#  define BOOST_NO_RESULT_OF 1
    1.65 +#endif
    1.66 +
    1.67 +}
    1.68 +
    1.69 +#endif // BOOST_RESULT_OF_HPP