clarify/fix std::visit compile time check

This commit is contained in:
Lion Kortlepel
2026-04-19 20:34:20 +00:00
parent 4045727c8b
commit 06bd719dbf
3 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -570,7 +570,7 @@ sol::table TLuaEngine::StateThreadData::Lua_TriggerGlobalEvent(const std::string
// monostate means no result value
Result.set(i, sol::lua_nil_t());
else
static_assert(false, "non-exhaustive visitor!");
static_assert(AlwaysFalseV<T>, "non-exhaustive visitor!");
}, Snapshot.Result.V);
}
@@ -1259,7 +1259,7 @@ void TLuaEngine::StateThreadData::operator()() {
} else if constexpr (std::is_same_v<T, float>) {
LuaArgs.push_back(sol::make_object(StateView, arg));
} else {
static_assert(false, "unhandled variant");
static_assert(AlwaysFalseV<T>, "unhandled variant");
}
}, Arg);
}