Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:49:26

0001 /*=============================================================================
0002     Copyright (c) 2006-2007 Tobias Schwinger
0003   
0004     Use modification and distribution are subject to the Boost Software 
0005     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0006     http://www.boost.org/LICENSE_1_0.txt).
0007 ==============================================================================*/
0008 
0009 #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED)
0010 #define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
0011 
0012 #include <boost/fusion/support/config.hpp>
0013 #include <boost/type_traits/add_reference.hpp>
0014 #include <boost/config.hpp>
0015 
0016 #include <boost/fusion/functional/adapter/detail/access.hpp>
0017 #include <boost/fusion/functional/invocation/invoke_procedure.hpp>
0018 
0019 #if defined (BOOST_MSVC)
0020 #  pragma warning(push)
0021 #  pragma warning (disable: 4512) // assignment operator could not be generated.
0022 #endif
0023 
0024 namespace boost { namespace fusion
0025 {
0026     template <typename Function> class fused_procedure;
0027 
0028     //----- ---- --- -- - -  -   -
0029 
0030     template <typename Function>
0031     class fused_procedure
0032     {
0033         Function fnc_transformed;
0034 
0035         typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
0036         typedef typename detail::qf<Function>::type & func_fwd_t;
0037 
0038     public:
0039 
0040         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0041         inline explicit fused_procedure(func_const_fwd_t f = Function())
0042             : fnc_transformed(f)
0043         { }
0044 
0045         template <class Seq> 
0046         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0047         inline void operator()(Seq const & s) const
0048         {
0049             fusion::invoke_procedure<
0050                 func_const_fwd_t >(this->fnc_transformed,s);
0051         }
0052 
0053         template <class Seq> 
0054         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0055         inline void operator()(Seq const & s) 
0056         {
0057             fusion::invoke_procedure<
0058                 func_fwd_t >(this->fnc_transformed,s);
0059         }
0060 
0061         template <class Seq> 
0062         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0063         inline void operator()(Seq & s) const
0064         {
0065             fusion::invoke_procedure<
0066                 func_const_fwd_t >(this->fnc_transformed,s);
0067         }
0068 
0069         template <class Seq> 
0070         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0071         inline void operator()(Seq & s) 
0072         {
0073             return fusion::invoke_procedure<
0074                 func_fwd_t >(this->fnc_transformed,s);
0075         }
0076 
0077         typedef void result_type;
0078     };
0079 }}
0080 
0081 #if defined (BOOST_MSVC)
0082 #  pragma warning(pop)
0083 #endif
0084 
0085 #endif
0086