File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 66
77namespace luabind
88{
9- template <typename TResult>
9+ template <typename TResult, typename ... Policies >
1010class functor : public adl ::object
1111{
1212public:
1313 functor () {}
1414 functor (const adl::object &obj) : adl::object(obj) {}
1515
16- template <typename ... Args>
16+ template <typename ... Args>
1717 TResult operator ()(Args &&...args) const
18- { return call_function<TResult>(*static_cast <const adl::object *>(this ), std::forward<Args>(args)...); }
18+ {
19+ auto self = static_cast <const adl::object *>(this );
20+ return call_function<TResult, policy_list<Policies...>>(*self, std::forward<Args>(args)...);
21+ }
1922};
2023
21- template <>
22- template <typename ... Args>
23- void functor<void >::operator ()(Args &&...args) const
24- { call_function<void >(*static_cast <const adl::object *>(this ), std::forward<Args>(args)...); }
24+ template <>
25+ template <typename ... Args>
26+ void functor<void , typename ...>::operator ()(Args &&...args) const
27+ {
28+ auto self = static_cast <const adl::object *>(this );
29+ call_function<void , policy_list<Policies...>>(*self, std::forward<Args>(args)...);
30+ }
2531
2632namespace detail
2733{
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ namespace adl
1515class object ;
1616}
1717
18- template <class T > class functor ;
18+ template <typename TResult, typename ... Policies>
19+ class functor ;
1920template <class T , class ValueWrapper >
2021T object_cast (ValueWrapper const & value_wrapper);
2122};
You can’t perform that action at this time.
0 commit comments