// Copyright (C) 2012 Vicente J. Botet Escriba // // 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) // 2013/04 Vicente J. Botet Escriba // Provide implementation up to 9 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined. // Make use of Boost.Move // Make use of Boost.Tuple (movable) // 2012/11 Vicente J. Botet Escriba // Adapt to boost libc++ implementation //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // The invoker code is based on the one from libcxx. //===----------------------------------------------------------------------===// #ifndef BOOST_THREAD_DETAIL_INVOKER_HPP #define BOOST_THREAD_DETAIL_INVOKER_HPP #include #include #include #include #include #include #include #include namespace lslboost { namespace detail { #if defined(BOOST_THREAD_PROVIDES_INVOKE) && ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && ! defined(BOOST_NO_CXX11_HDR_TUPLE) template class invoker { //typedef typename decay::type Fpd; //typedef tuple::type...> Argsd; //csbl::tuple f_; csbl::tuple f_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE( invoker) //typedef typename invoke_of<_Fp, _Args...>::type Rp; typedef typename result_of::type result_type; template BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(As)... args) : f_(lslboost::forward(f), lslboost::forward(args)...) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : f_(lslboost::move(BOOST_THREAD_RV(f).f_)) {} BOOST_SYMBOL_VISIBLE invoker( const invoker& f) : f_(f.f_) {} BOOST_SYMBOL_VISIBLE invoker& operator=(BOOST_THREAD_RV_REF(invoker) f) { if (this != &f) { f_ = lslboost::move(BOOST_THREAD_RV(f).f_); } return *this; } BOOST_SYMBOL_VISIBLE invoker& operator=( BOOST_THREAD_COPY_ASSIGN_REF(invoker) f) { if (this != &f) { f_ = f.f_; } return *this; } result_type operator()() { typedef typename make_tuple_indices<1+sizeof...(Args), 1>::type Index; return execute(Index()); } private: template result_type execute(tuple_indices) { return detail::invoke(lslboost::move(csbl::get<0>(f_)), lslboost::move(csbl::get(f_))...); } }; template class invoker_ret { //typedef typename decay::type Fpd; //typedef tuple::type...> Argsd; //csbl::tuple f_; csbl::tuple f_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE( invoker_ret) typedef R result_type; template BOOST_SYMBOL_VISIBLE explicit invoker_ret(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(As)... args) : f_(lslboost::forward(f), lslboost::forward(args)...) {} BOOST_SYMBOL_VISIBLE invoker_ret(BOOST_THREAD_RV_REF(invoker_ret) f) : f_(lslboost::move(BOOST_THREAD_RV(f).f_)) {} result_type operator()() { typedef typename make_tuple_indices<1+sizeof...(Args), 1>::type Index; return execute(Index()); } private: template result_type execute(tuple_indices) { return detail::invoke(lslboost::move(csbl::get<0>(f_)), lslboost::move(csbl::get(f_))...); } }; //BOOST_THREAD_DCL_MOVABLE_BEG(X) invoker BOOST_THREAD_DCL_MOVABLE_END #else #if ! defined BOOST_MSVC && defined(BOOST_THREAD_PROVIDES_INVOKE) #define BOOST_THREAD_RV_REF_ARG_T(z, n, unused) BOOST_PP_COMMA_IF(n) BOOST_THREAD_RV_REF(Arg##n) #define BOOST_THREAD_RV_REF_A_T(z, n, unused) BOOST_PP_COMMA_IF(n) BOOST_THREAD_RV_REF(A##n) #define BOOST_THREAD_RV_REF_ARG(z, n, unused) , BOOST_THREAD_RV_REF(Arg##n) arg##n #define BOOST_THREAD_FWD_REF_A(z, n, unused) , BOOST_THREAD_FWD_REF(A##n) arg##n #define BOOST_THREAD_FWD_REF_ARG(z, n, unused) , BOOST_THREAD_FWD_REF(Arg##n) arg##n #define BOOST_THREAD_FWD_PARAM(z, n, unused) , lslboost::forward(arg##n) #define BOOST_THREAD_FWD_PARAM_A(z, n, unused) , lslboost::forward(arg##n) #define BOOST_THREAD_DCL(z, n, unused) Arg##n v##n; #define BOOST_THREAD_MOVE_PARAM(z, n, unused) , v##n(lslboost::move(arg##n)) #define BOOST_THREAD_FORWARD_PARAM_A(z, n, unused) , v##n(lslboost::forward(arg##n)) #define BOOST_THREAD_MOVE_RHS_PARAM(z, n, unused) , v##n(lslboost::move(x.v##n)) #define BOOST_THREAD_MOVE_DCL(z, n, unused) , lslboost::move(v##n) #define BOOST_THREAD_MOVE_DCL_T(z, n, unused) BOOST_PP_COMMA_IF(n) lslboost::move(v##n) #define BOOST_THREAD_ARG_DEF(z, n, unused) , class Arg##n = tuples::null_type template class invoker; #define BOOST_THREAD_ASYNC_FUNCT(z, n, unused) \ template \ class invoker \ { \ Fp fp_; \ BOOST_PP_REPEAT(n, BOOST_THREAD_DCL, ~) \ public: \ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) \ typedef typename result_of::type result_type; \ \ template \ BOOST_SYMBOL_VISIBLE \ explicit invoker(BOOST_THREAD_FWD_REF(F) f \ BOOST_PP_REPEAT(n, BOOST_THREAD_FWD_REF_A, ~) \ ) \ : fp_(lslboost::forward(f)) \ BOOST_PP_REPEAT(n, BOOST_THREAD_FORWARD_PARAM_A, ~) \ {} \ \ BOOST_SYMBOL_VISIBLE \ invoker(BOOST_THREAD_RV_REF(invoker) x) \ : fp_(lslboost::move(x.fp_)) \ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_RHS_PARAM, ~) \ {} \ \ result_type operator()() { \ return detail::invoke(lslboost::move(fp_) \ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_DCL, ~) \ ); \ } \ }; \ \ template \ class invoker \ { \ typedef R(*Fp)(BOOST_PP_REPEAT(n, BOOST_THREAD_RV_REF_ARG_T, ~)); \ Fp fp_; \ BOOST_PP_REPEAT(n, BOOST_THREAD_DCL, ~) \ public: \ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) \ typedef typename result_of::type result_type; \ \ template \ BOOST_SYMBOL_VISIBLE \ explicit invoker(R2(*f)(BOOST_PP_REPEAT(n, BOOST_THREAD_RV_REF_A_T, ~)) \ BOOST_PP_REPEAT(n, BOOST_THREAD_FWD_REF_A, ~) \ ) \ : fp_(f) \ BOOST_PP_REPEAT(n, BOOST_THREAD_FORWARD_PARAM_A, ~) \ {} \ \ BOOST_SYMBOL_VISIBLE \ invoker(BOOST_THREAD_RV_REF(invoker) x) \ : fp_(x.fp_) \ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_RHS_PARAM, ~) \ {} \ \ result_type operator()() { \ return fp_( \ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_DCL_T, ~) \ ); \ } \ }; BOOST_PP_REPEAT(BOOST_THREAD_MAX_ARGS, BOOST_THREAD_ASYNC_FUNCT, ~) #undef BOOST_THREAD_RV_REF_ARG_T #undef BOOST_THREAD_RV_REF_ARG #undef BOOST_THREAD_FWD_REF_ARG #undef BOOST_THREAD_FWD_REF_A #undef BOOST_THREAD_FWD_PARAM #undef BOOST_THREAD_FWD_PARAM_A #undef BOOST_THREAD_DCL #undef BOOST_THREAD_MOVE_PARAM #undef BOOST_THREAD_MOVE_RHS_PARAM #undef BOOST_THREAD_MOVE_DCL #undef BOOST_THREAD_ARG_DEF #undef BOOST_THREAD_ASYNC_FUNCT #else template class invoker; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; T7 v7_; T8 v8_; //::lslboost::tuple f_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 , BOOST_THREAD_RV_REF(T7) a7 , BOOST_THREAD_RV_REF(T8) a8 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) , v4_(lslboost::move(a4)) , v5_(lslboost::move(a5)) , v6_(lslboost::move(a6)) , v7_(lslboost::move(a7)) , v8_(lslboost::move(a8)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) , v4_(lslboost::move(BOOST_THREAD_RV(f).v4_)) , v5_(lslboost::move(BOOST_THREAD_RV(f).v5_)) , v6_(lslboost::move(BOOST_THREAD_RV(f).v6_)) , v7_(lslboost::move(BOOST_THREAD_RV(f).v7_)) , v8_(lslboost::move(BOOST_THREAD_RV(f).v8_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) , lslboost::move(v4_) , lslboost::move(v5_) , lslboost::move(v6_) , lslboost::move(v7_) , lslboost::move(v8_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; T7 v7_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 , BOOST_THREAD_RV_REF(T7) a7 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) , v4_(lslboost::move(a4)) , v5_(lslboost::move(a5)) , v6_(lslboost::move(a6)) , v7_(lslboost::move(a7)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) , v4_(lslboost::move(BOOST_THREAD_RV(f).v4_)) , v5_(lslboost::move(BOOST_THREAD_RV(f).v5_)) , v6_(lslboost::move(BOOST_THREAD_RV(f).v6_)) , v7_(lslboost::move(BOOST_THREAD_RV(f).v7_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) , lslboost::move(v4_) , lslboost::move(v5_) , lslboost::move(v6_) , lslboost::move(v7_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) , v4_(lslboost::move(a4)) , v5_(lslboost::move(a5)) , v6_(lslboost::move(a6)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) , v4_(lslboost::move(BOOST_THREAD_RV(f).v4_)) , v5_(lslboost::move(BOOST_THREAD_RV(f).v5_)) , v6_(lslboost::move(BOOST_THREAD_RV(f).v6_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) , lslboost::move(v4_) , lslboost::move(v5_) , lslboost::move(v6_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) , v4_(lslboost::move(a4)) , v5_(lslboost::move(a5)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) , v4_(lslboost::move(BOOST_THREAD_RV(f).v4_)) , v5_(lslboost::move(BOOST_THREAD_RV(f).v5_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) , lslboost::move(v4_) , lslboost::move(v5_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) , v4_(lslboost::move(a4)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) , v4_(lslboost::move(BOOST_THREAD_RV(f).v4_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) , lslboost::move(v4_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) , v3_(lslboost::move(a3)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) , v3_(lslboost::move(BOOST_THREAD_RV(f).v3_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) , lslboost::move(v3_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; T2 v2_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) , v2_(lslboost::move(a2)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) , v2_(lslboost::move(BOOST_THREAD_RV(f).v2_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) , lslboost::move(v2_) ); } }; template class invoker { Fp fp_; T0 v0_; T1 v1_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) , v1_(lslboost::move(a1)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) , v1_(lslboost::move(BOOST_THREAD_RV(f).v1_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) , lslboost::move(v1_) ); } }; template class invoker { Fp fp_; T0 v0_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 ) : fp_(lslboost::move(f)) , v0_(lslboost::move(a0)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(BOOST_THREAD_RV(f).fp)) , v0_(lslboost::move(BOOST_THREAD_RV(f).v0_)) {} result_type operator()() { return detail::invoke(lslboost::move(fp_) , lslboost::move(v0_) ); } }; template class invoker { Fp fp_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(BOOST_THREAD_FWD_REF(Fp) f) : fp_(lslboost::move(f)) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(lslboost::move(f.fp_)) {} result_type operator()() { return fp_(); } }; template class invoker { typedef R(*Fp)(); Fp fp_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit invoker(Fp f) : fp_(f) {} BOOST_SYMBOL_VISIBLE invoker(BOOST_THREAD_RV_REF(invoker) f) : fp_(f.fp_) {} result_type operator()() { return fp_(); } }; #endif #endif } } #include #endif // header