fix GCC 11 compiler/libstdc++ error

GCC 11's C++ stdlib does a weird maneuver here where it needs to know
the size of the std::pair<>::second's type. So we wrap it in a ptr.
This commit is contained in:
Lion Kortlepel
2026-04-19 21:16:43 +00:00
parent 7c6acfdc86
commit 57fe7cb055
4 changed files with 56 additions and 48 deletions
+2 -2
View File
@@ -554,9 +554,9 @@ sol::table TLuaEngine::StateThreadData::Lua_TriggerGlobalEvent(const std::string
auto Snapshot = Value->GetDetachedSnapshot();
std::visit([i, &Result](auto&& arg) {
using T = std::decay_t<decltype(arg)>;
if constexpr (std::is_same_v<T, std::vector<TDetachedLuaValue>>)
if constexpr (std::is_same_v<T, TDetachedLuaValue::Array>)
Result.set(i, arg);
else if constexpr (std::is_same_v<T, std::unordered_map<std::string, TDetachedLuaValue>>)
else if constexpr (std::is_same_v<T, TDetachedLuaValue::Object>)
Result.set(i, arg);
else if constexpr (std::is_same_v<T, bool>)
Result.set(i, arg);