Skip to content

Commit 88c4400

Browse files
authored
Fix ArgumentParser not handling noexcept in GCC 13.1 upwards
1 parent ffcde8e commit 88c4400

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Shared/mods/deathmatch/logic/lua/CLuaFunctionParser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ struct CLuaFunctionParser
744744
{
745745
};
746746

747-
template <bool ErrorOnFailure, auto ReturnOnFailure, typename Ret, typename... Args, auto (*Func)(Args...)->Ret>
747+
template <bool ErrorOnFailure, auto ReturnOnFailure, bool NoExcept, typename Ret, typename... Args, Ret (*Func)(Args...) noexcept(NoExcept)>
748748
struct CLuaFunctionParser<ErrorOnFailure, ReturnOnFailure, Func> : CLuaFunctionParserBase
749749
{
750750
template <typename... Params>
@@ -832,7 +832,7 @@ struct CLuaFunctionParser<ErrorOnFailure, ReturnOnFailure, Func> : CLuaFunctionP
832832
// Case where F is a class method pointer
833833
// Note: If you see weird compiler errors like: Undefined type, overload resolution failed, etc..
834834
// Ask on Dev Discord(#new-argument-parser), because rn this implementation is pretty beta. - 03/2021
835-
template <bool ErrorOnFailure, auto ReturnOnFailure, typename T, typename R, typename... Args, R(T::*F)(Args...)>
835+
template <bool ErrorOnFailure, auto ReturnOnFailure, typename T, bool NoExcept, typename R, typename... Args, R(T::*F)(Args...) noexcept(NoExcept)>
836836
struct CLuaFunctionParser<ErrorOnFailure, ReturnOnFailure, F>
837837
{
838838
// Remove constness here, because we must be able to std::move

0 commit comments

Comments
 (0)