mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-08-27 04:27:42 +00:00
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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user