Skip to content

Commit 5b6881e

Browse files
glebmcuavas
andcommitted
Work around #1581
See #1581 (comment) Co-authored-by: Vas Crabb <[email protected]>
1 parent c1f95a7 commit 5b6881e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

include/sol/function_types_stateless.hpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,13 @@ namespace sol { namespace function_detail {
320320
}
321321

322322
template <bool is_yielding, bool no_trampoline>
323-
static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v<T>) {
323+
static int call(lua_State* L)
324+
#if SOL_IS_ON(SOL_COMPILER_CLANG)
325+
// apparent regression in clang 18 - llvm/llvm-project#91362
326+
#else
327+
noexcept(std::is_nothrow_copy_assignable_v<T>)
328+
#endif
329+
{
324330
int nr;
325331
if constexpr (no_trampoline) {
326332
nr = real_call(L);
@@ -360,7 +366,13 @@ namespace sol { namespace function_detail {
360366
}
361367

362368
template <bool is_yielding, bool no_trampoline>
363-
static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v<T>) {
369+
static int call(lua_State* L)
370+
#if SOL_IS_ON(SOL_COMPILER_CLANG)
371+
// apparent regression in clang 18 - llvm/llvm-project#91362
372+
#else
373+
noexcept(std::is_nothrow_copy_assignable_v<T>)
374+
#endif
375+
{
364376
int nr;
365377
if constexpr (no_trampoline) {
366378
nr = real_call(L);

0 commit comments

Comments
 (0)