Browse CVS RepositoryView of /cradle/cradle/cradle/lambda/lambda.hpp
Revision 1.3 -
(download)
(as text)
(annotate)
Mon Dec 11 14:41:51 2006 UTC (2 years, 11 months ago) by cryolite Branch: MAIN CVS Tags: HEAD Changes since 1.2: +41 -23 lines Added `boost::result_of' specializations for `boost::lambda::lambda_functor' const types. // Copyright 2004, 2005, 2006 Cryolite. // 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) // This header provides specializations of 'boost::result_of' for // 'boost::lambda::lambda_functor.' #ifndef CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD #define CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD #include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp> #include <boost/preprocessor/repetition/repeat.hpp> #include <boost/preprocessor/facilities/intercept.hpp> #include <boost/utility/result_of.hpp> #include <cradle/boost/lambda/lambda.hpp> #include <boost/tuple/tuple.hpp> namespace boost{ #define CRADLE_LAMBDA_result_of_spec( Z, I, _ ) \ template< \ class T \ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( I, class BOOST_PP_INTERCEPT, A ) \ > \ struct result_of< \ boost::lambda::lambda_functor< T >( BOOST_PP_ENUM_PARAMS( I, A ) ) \ > \ : public boost::lambda::lambda_functor< T >::template sig< \ boost::tuple< \ boost::lambda::lambda_functor< T > \ BOOST_PP_ENUM_TRAILING_PARAMS( I, A ) \ > \ > \ {}; \ \ template< \ class T \ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( I, class BOOST_PP_INTERCEPT, A ) \ > \ struct result_of< \ boost::lambda::lambda_functor< T > const( BOOST_PP_ENUM_PARAMS( I, A ) ) \ > \ : public boost::lambda::lambda_functor< T >::template sig< \ boost::tuple< \ boost::lambda::lambda_functor< T > \ BOOST_PP_ENUM_TRAILING_PARAMS( I, A ) \ > \ > \ {}; \ /**/ BOOST_PP_REPEAT( 10, CRADLE_LAMBDA_result_of_spec, _ ) #undef CRADLE_LAMBDA_result_of_spec } // namespace boost #endif // CRADLE_LAMBDA_LAMBDA_HPP_INCLUDE_GUARD
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||