123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- #ifndef BOOST_PROTO_TRANSFORM_PASS_THROUGH_HPP_EAN_12_26_2006
- #define BOOST_PROTO_TRANSFORM_PASS_THROUGH_HPP_EAN_12_26_2006
- #include <boost/preprocessor/cat.hpp>
- #include <boost/preprocessor/repetition/enum.hpp>
- #include <boost/preprocessor/iteration/iterate.hpp>
- #include <boost/mpl/bool.hpp>
- #include <boost/mpl/if.hpp>
- #include <boost/type_traits/is_same.hpp>
- #include <boost/type_traits/remove_reference.hpp>
- #include <boost/proto/proto_fwd.hpp>
- #include <boost/proto/args.hpp>
- #include <boost/proto/transform/impl.hpp>
- #include <boost/proto/detail/ignore_unused.hpp>
- #if defined(_MSC_VER)
- # pragma warning(push)
- # pragma warning(disable : 4714)
- #endif
- namespace boost { namespace proto
- {
- namespace detail
- {
- template<
- typename Grammar
- , typename Domain
- , typename Expr
- , typename State
- , typename Data
- , long Arity = arity_of<Expr>::value
- >
- struct pass_through_impl
- {};
- #include <boost/proto/transform/detail/pass_through_impl.hpp>
- template<typename Grammar, typename Domain, typename Expr, typename State, typename Data>
- struct pass_through_impl<Grammar, Domain, Expr, State, Data, 0>
- : transform_impl<Expr, State, Data>
- {
- typedef Expr result_type;
-
-
-
- BOOST_FORCEINLINE
- BOOST_PROTO_RETURN_TYPE_STRICT_LOOSE(result_type, typename pass_through_impl::expr_param)
- operator()(
- typename pass_through_impl::expr_param e
- , typename pass_through_impl::state_param
- , typename pass_through_impl::data_param
- ) const
- {
- return e;
- }
- };
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- template<typename Grammar, typename Domain >
- struct pass_through
- : transform<pass_through<Grammar, Domain> >
- {
- template<typename Expr, typename State, typename Data>
- struct impl
- : detail::pass_through_impl<Grammar, Domain, Expr, State, Data>
- {};
- };
-
-
- template<typename Grammar, typename Domain>
- struct is_callable<pass_through<Grammar, Domain> >
- : mpl::true_
- {};
- }}
- #if defined(_MSC_VER)
- # pragma warning(pop)
- #endif
- #endif
|