1 /*=============================================================================
2 Copyright (c) 2006-2007 Tobias Schwinger
4 Use modification and distribution are subject to the Boost Software
5 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt).
7 ==============================================================================*/
9 #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED)
10 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
12 #include <boost/fusion/support/config.hpp>
13 #include <boost/type_traits/add_reference.hpp>
14 #include <boost/config.hpp>
16 #include <boost/fusion/functional/adapter/detail/access.hpp>
17 #include <boost/fusion/functional/invocation/invoke_procedure.hpp>
19 #if defined (BOOST_MSVC)
20 # pragma warning(push)
21 # pragma warning (disable: 4512) // assignment operator could not be generated.
24 namespace boost { namespace fusion
26 template <typename Function> class fused_procedure;
28 //----- ---- --- -- - - - -
30 template <typename Function>
33 Function fnc_transformed;
35 typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
36 typedef typename detail::qf<Function>::type & func_fwd_t;
40 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
41 inline explicit fused_procedure(func_const_fwd_t f = Function())
46 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
47 inline void operator()(Seq const & s) const
49 fusion::invoke_procedure<
50 func_const_fwd_t >(this->fnc_transformed,s);
54 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
55 inline void operator()(Seq const & s)
57 fusion::invoke_procedure<
58 func_fwd_t >(this->fnc_transformed,s);
62 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
63 inline void operator()(Seq & s) const
65 fusion::invoke_procedure<
66 func_const_fwd_t >(this->fnc_transformed,s);
70 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
71 inline void operator()(Seq & s)
73 return fusion::invoke_procedure<
74 func_fwd_t >(this->fnc_transformed,s);
77 typedef void result_type;
81 #if defined (BOOST_MSVC)