From 4da99a13f5cd8054ff8f747a0234a74b271b663d Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 8 May 2024 03:32:05 +1000 Subject: [PATCH] 3rdparty/sol2: Worked around apparent regression in clang 18. When taking a pointer to a static member function template in a class template, clang reports a substitution error if the noexcept specification uses an expression that depends on class template arguments. See llvm/llvm-project#91362 on GitHub. --- 3rdparty/sol2/sol/sol.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/3rdparty/sol2/sol/sol.hpp b/3rdparty/sol2/sol/sol.hpp index 8b0b7d36ea4..0bac66042d5 100644 --- a/3rdparty/sol2/sol/sol.hpp +++ b/3rdparty/sol2/sol/sol.hpp @@ -19456,7 +19456,13 @@ namespace sol { namespace function_detail { } template - static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v) { + static int call(lua_State* L) +#if SOL_IS_ON(SOL_COMPILER_CLANG) + // apparent regression in clang 18 - llvm/llvm-project#91362 +#else + noexcept(std::is_nothrow_copy_assignable_v) +#endif + { int nr; if constexpr (no_trampoline) { nr = real_call(L);