{ add(k, new LoaderFunc5<L, A0, A1, A2, A3, A4>(func)); }
#endif
+#if __cplusplus>=201103L
+ /** Adds a keyword that is loaded by calling a function with a bound
+ first argument. */
+ template<typename L, typename B0, typename... Args>
+ void add(const std::string &k, void (L::*func)(B0, Args...), const typename RemoveReference<B0>::Type &b0)
+ { add(k, new LoaderFuncNBound1<L, B0, Args...>(func, b0)); }
+#endif
+
/** Adds a keyword that is loaded into a member of the loaded object. */
template<typename L, typename T0>
void add(const std::string &k, T0 L::*p0)
{ return create_signature<Args...>(); }
};
+
+template<typename L, typename B0, typename... Args>
+class LoaderFuncNBound1: public LoaderAction
+{
+protected:
+ typedef void (L::*FuncType)(B0, Args...);
+ typedef typename RemoveReference<B0>::Type Bound0Type;
+
+ FuncType func;
+ Bound0Type bound0;
+
+public:
+ LoaderFuncNBound1(FuncType f, const Bound0Type &b0): func(f), bound0(b0) { }
+
+ virtual void execute(Loader &l, const Statement &st) const
+ {
+ Apply<0, Args...>::apply(dynamic_cast<L &>(l), func, st, bound0);
+ }
+
+ virtual void execute(Loader &l, const ArgumentStore &as) const
+ {
+ Apply<0, Args...>::apply(dynamic_cast<L &>(l), func, as, bound0);
+ }
+
+ virtual std::string get_signature() const
+ { return create_signature<Args...>(); }
+};
#endif