- template<typename L, typename A0, typename A1, typename A2>
- void add(const std::string &k, void (L::*func)(A0, A1, A2))
- { add(k, new LoaderFunc3<L, A0, A1, A2>(func)); }
-
- template<typename L, typename A0, typename A1, typename A2, typename A3>
- void add(const std::string &k, void (L::*func)(A0, A1, A2, A3))
- { add(k, new LoaderFunc4<L, A0, A1, A2, A3>(func)); }
-
- template<typename L, typename A0, typename A1, typename A2, typename A3, typename A4>
- void add(const std::string &k, void (L::*func)(A0, A1, A2, A3, A4))
- { add(k, new LoaderFunc5<L, A0, A1, A2, A3, A4>(func)); }
+ /** 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 std::remove_reference<B0>::type &b0)
+ { add(k, new LoaderFuncNBound1<L, B0, Args...>(func, b0)); }