| 1 : |
cryolite |
1.3 |
// Copyright 2004, 2005, 2006 Cryolite. |
| 2 : |
cryolite |
1.1 |
// Distributed under the Boost Software License, Version 1.0. (See |
| 3 : |
|
|
// accompanying file LICENSE_1_0.txt or copy at |
| 4 : |
|
|
// http://www.boost.org/LICENSE_1_0.txt) |
| 5 : |
|
|
|
| 6 : |
|
|
// This header provides specializations of 'boost::result_of' for |
| 7 : |
|
|
// 'boost::lambda::lambda_functor.' |
| 8 : |
|
|
#ifndef CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD |
| 9 : |
|
|
#define CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD |
| 10 : |
|
|
|
| 11 : |
cryolite |
1.3 |
#include <boost/preprocessor/repetition/enum_params.hpp> |
| 12 : |
|
|
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp> |
| 13 : |
|
|
#include <boost/preprocessor/repetition/repeat.hpp> |
| 14 : |
|
|
#include <boost/preprocessor/facilities/intercept.hpp> |
| 15 : |
cryolite |
1.1 |
#include <boost/utility/result_of.hpp> |
| 16 : |
cryolite |
1.2 |
#include <cradle/boost/lambda/lambda.hpp> |
| 17 : |
cryolite |
1.3 |
#include <boost/tuple/tuple.hpp> |
| 18 : |
|
|
|
| 19 : |
cryolite |
1.1 |
|
| 20 : |
|
|
|
| 21 : |
|
|
namespace boost{ |
| 22 : |
|
|
|
| 23 : |
cryolite |
1.3 |
#define CRADLE_LAMBDA_result_of_spec( Z, I, _ ) \ |
| 24 : |
|
|
template< \ |
| 25 : |
|
|
class T \ |
| 26 : |
|
|
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( I, class BOOST_PP_INTERCEPT, A ) \ |
| 27 : |
|
|
> \ |
| 28 : |
|
|
struct result_of< \ |
| 29 : |
|
|
boost::lambda::lambda_functor< T >( BOOST_PP_ENUM_PARAMS( I, A ) ) \ |
| 30 : |
|
|
> \ |
| 31 : |
|
|
: public boost::lambda::lambda_functor< T >::template sig< \ |
| 32 : |
|
|
boost::tuple< \ |
| 33 : |
|
|
boost::lambda::lambda_functor< T > \ |
| 34 : |
|
|
BOOST_PP_ENUM_TRAILING_PARAMS( I, A ) \ |
| 35 : |
|
|
> \ |
| 36 : |
|
|
> \ |
| 37 : |
|
|
{}; \ |
| 38 : |
|
|
\ |
| 39 : |
|
|
template< \ |
| 40 : |
|
|
class T \ |
| 41 : |
|
|
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( I, class BOOST_PP_INTERCEPT, A ) \ |
| 42 : |
|
|
> \ |
| 43 : |
|
|
struct result_of< \ |
| 44 : |
|
|
boost::lambda::lambda_functor< T > const( BOOST_PP_ENUM_PARAMS( I, A ) ) \ |
| 45 : |
|
|
> \ |
| 46 : |
|
|
: public boost::lambda::lambda_functor< T >::template sig< \ |
| 47 : |
|
|
boost::tuple< \ |
| 48 : |
|
|
boost::lambda::lambda_functor< T > \ |
| 49 : |
|
|
BOOST_PP_ENUM_TRAILING_PARAMS( I, A ) \ |
| 50 : |
|
|
> \ |
| 51 : |
|
|
> \ |
| 52 : |
|
|
{}; \ |
| 53 : |
|
|
/**/ |
| 54 : |
cryolite |
1.1 |
|
| 55 : |
cryolite |
1.3 |
BOOST_PP_REPEAT( 10, CRADLE_LAMBDA_result_of_spec, _ ) |
| 56 : |
cryolite |
1.1 |
|
| 57 : |
cryolite |
1.3 |
#undef CRADLE_LAMBDA_result_of_spec |
| 58 : |
cryolite |
1.1 |
|
| 59 : |
|
|
} // namespace boost |
| 60 : |
|
|
|
| 61 : |
|
|
|
| 62 : |
cryolite |
1.3 |
|
| 63 : |
cryolite |
1.1 |
#endif // CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD |