mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merge branch 'develop' into sol3
# Conflicts: # include/single/sol/sol.hpp # include/single/sol/sol_forward.hpp
This commit is contained in:
commit
6ff83c6657
|
@ -649,7 +649,9 @@ namespace stack {
|
|||
template <std::size_t I, typename Handler>
|
||||
static bool is_one(std::integral_constant<std::size_t, I>, lua_State* L, int index, Handler&& handler, record& tracking) {
|
||||
typedef std::variant_alternative_t<I - 1, V> T;
|
||||
if (stack::check<T>(L, index, no_panic, tracking)) {
|
||||
record temp_tracking = tracking;
|
||||
if (stack::check<T>(L, index, no_panic, temp_tracking)) {
|
||||
tracking = temp_tracking;
|
||||
return true;
|
||||
}
|
||||
return is_one(std::integral_constant<std::size_t, I - 1>(), L, index, std::forward<Handler>(handler), tracking);
|
||||
|
|
|
@ -914,7 +914,9 @@ namespace stack {
|
|||
template <std::size_t I>
|
||||
static V get_one(std::integral_constant<std::size_t, I>, lua_State* L, int index, record& tracking) {
|
||||
typedef std::variant_alternative_t<I - 1, V> T;
|
||||
if (stack::check<T>(L, index, no_panic, tracking)) {
|
||||
record temp_tracking = tracking;
|
||||
if (stack::check<T>(L, index, no_panic, temp_tracking)) {
|
||||
tracking = temp_tracking;
|
||||
return V(std::in_place_index<I - 1>, stack::get<T>(L, index));
|
||||
}
|
||||
return get_one(std::integral_constant<std::size_t, I - 1>(), L, index, tracking);
|
||||
|
|
Loading…
Reference in New Issue
Block a user