mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
decltype
with types
. It seems unfair.
This commit is contained in:
parent
63536dd8d0
commit
c8417d65de
|
@ -230,11 +230,11 @@ auto rtl_pop(lua_State*, F&& f, types<Args...>, types<>, Vs&&... vs) -> decltype
|
||||||
return f(std::forward<Vs>(vs)...);
|
return f(std::forward<Vs>(vs)...);
|
||||||
}
|
}
|
||||||
template<typename F, typename Head, typename... Vs, typename... Args>
|
template<typename F, typename Head, typename... Vs, typename... Args>
|
||||||
auto rtl_pop(lua_State* L, F&& f, types<Args...> t, types<Head>, Vs&&... vs) -> decltype(f(std::forward<Args>(std::declval<Args>())...)) {
|
auto rtl_pop(lua_State* L, F&& f, types<Args...> t, types<Head>, Vs&&... vs) -> decltype(f(std::declval<Args>()...)) {
|
||||||
return rtl_pop(L, std::forward<F>(f), t, types<>(), pop<Head>(L), std::forward<Vs>(vs)...);
|
return rtl_pop(L, std::forward<F>(f), t, types<>(), pop<Head>(L), std::forward<Vs>(vs)...);
|
||||||
}
|
}
|
||||||
template<typename F, typename Head, typename... Tail, typename... Vs, typename... Args>
|
template<typename F, typename Head, typename... Tail, typename... Vs, typename... Args>
|
||||||
auto rtl_pop(lua_State* L, F&& f, types<Args...> t, types<Head, Tail...>, Vs&&... vs) -> decltype(f(std::forward<Args>(std::declval<Args>())...)) {
|
auto rtl_pop(lua_State* L, F&& f, types<Args...> t, types<Head, Tail...>, Vs&&... vs) -> decltype(f(std::declval<Args>()...)) {
|
||||||
return rtl_pop(L, std::forward<F>(f), t, types<Tail...>(), pop<Head>(L), std::forward<Vs>(vs)...);
|
return rtl_pop(L, std::forward<F>(f), t, types<Tail...>(), pop<Head>(L), std::forward<Vs>(vs)...);
|
||||||
}
|
}
|
||||||
} // detail
|
} // detail
|
||||||
|
|
Loading…
Reference in New Issue
Block a user