mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
fixed proxy (perhaps I broke it recently?)
This commit is contained in:
parent
8c9f8c3341
commit
7c7f862cb4
|
@ -84,8 +84,8 @@ void bench_lua_function( const std::string& dir, std::string& configurationname
|
|||
nonius::benchmark benchmarks [] = {
|
||||
nonius::benchmark( "fast_function - function_result", sol_fast_function_result_lua_bench( ) ),
|
||||
nonius::benchmark( "fast_function - call<>", sol_fast_direct_lua_bench( ) ),
|
||||
nonius::benchmark( "safe_function - function_result", sol_function_result_lua_bench( ) ),
|
||||
nonius::benchmark( "safe_function - call<>", sol_direct_lua_bench( ) ),
|
||||
nonius::benchmark( "function - function_result", sol_function_result_lua_bench( ) ),
|
||||
nonius::benchmark( "function - call<>", sol_direct_lua_bench( ) ),
|
||||
nonius::benchmark( "plain C", c_direct_lua_bench( ) ),
|
||||
};
|
||||
nonius::go( cfg, std::begin( benchmarks ), std::end( benchmarks ), nonius::html_reporter( ) );
|
||||
|
|
|
@ -81,10 +81,20 @@ public:
|
|||
return get<T&>( );
|
||||
}
|
||||
|
||||
template <typename K>
|
||||
decltype(auto) operator[](K&& key) const {
|
||||
return get<table>()[std::forward<K>(key)];
|
||||
}
|
||||
|
||||
template<typename... Ret, typename... Args>
|
||||
decltype(auto) call(Args&&... args) {
|
||||
return get<function>().call<Ret...>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
decltype(auto) operator()(Args&&... args) {
|
||||
return call<>(std::forward<Args>(args)...);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Table, typename Key, typename T>
|
||||
|
|
Loading…
Reference in New Issue
Block a user