| 1843 | |
| 1844 | template <typename Ret, typename... Args> |
| 1845 | Ret LuaContext::invokePath(String const& key, Args const&... args) const { |
| 1846 | auto p = getPath(key); |
| 1847 | if (auto f = p.ptr<LuaFunction>()) |
| 1848 | return f->invoke<Ret>(args...); |
| 1849 | throw LuaException::format("invokePath called on path '{}' which is not function type", key); |
| 1850 | } |
| 1851 | |
| 1852 | template <typename T> |
| 1853 | LuaValue LuaContext::luaFrom(T&& t) { |