/*============================================================================= Copyright (c) 2006-2007 Tobias Schwinger Use modification and distribution are subject to 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). ==============================================================================*/ #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED) #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED #include #include #include #include #include #if defined (BOOST_MSVC) # pragma warning(push) # pragma warning (disable: 4512) // assignment operator could not be generated. #endif namespace boost { namespace fusion { template class fused; //----- ---- --- -- - - - - template class fused { Function fnc_transformed; typedef typename detail::qf_c::type & func_const_fwd_t; typedef typename detail::qf::type & func_fwd_t; public: BOOST_FUSION_GPU_ENABLED inline explicit fused(func_const_fwd_t f = Function()) : fnc_transformed(f) { } template BOOST_FUSION_GPU_ENABLED inline typename result_of::invoke::type operator()(Seq const & s) const { return fusion::invoke(this->fnc_transformed,s); } template BOOST_FUSION_GPU_ENABLED inline typename result_of::invoke::type operator()(Seq const & s) { return fusion::invoke(this->fnc_transformed,s); } template BOOST_FUSION_GPU_ENABLED inline typename result_of::invoke::type operator()(Seq & s) const { return fusion::invoke(this->fnc_transformed,s); } template BOOST_FUSION_GPU_ENABLED inline typename result_of::invoke::type operator()(Seq & s) { return fusion::invoke(this->fnc_transformed,s); } template struct result; template struct result< Self const (Seq) > : result_of::invoke::type > { }; template struct result< Self(Seq) > : result_of::invoke::type > { }; }; }} #if defined (BOOST_MSVC) # pragma warning(pop) #endif #endif