Skip to content

Commit 87d28d5

Browse files
CI fix for clang <=20
1 parent d4a0430 commit 87d28d5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

libcxx/include/__tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,21 @@ public:
618618
allocator_traits<_Alloc>::construct(__na, std::addressof(__get_value()), std::forward<_Args>(__args)...);
619619
}
620620

621+
// This line fails with:
622+
// libcxx/test-suite-install/include/c++/v1/__memory/construct_at.h:38:49: note: non-literal type
623+
// 'std::__tree_node<std::__value_type<Key, int>, void *>' cannot be used in a constant expression
624+
//
625+
// during constant evaluation as part of P3372
626+
// on:
627+
// 1. Arm CI which is on clang 19.x (will be fixed in: https://github.com/llvm/llvm-project/issues/161159 )
628+
// 2. AppleClang is not yet using clang >= 20.x, which has "fixed" this issue
629+
// 3. A few others like FreeBSD/amd64, AArch64, AIX
630+
// FIXME: when AppleClang is based off of clang >= 20.x
631+
#if _LIBCPP_CLANG_VER < 2000
632+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 ~__tree_node() {}
633+
#else
621634
~__tree_node() = delete;
635+
#endif
622636
__tree_node(__tree_node const&) = delete;
623637
__tree_node& operator=(__tree_node const&) = delete;
624638
};

0 commit comments

Comments
 (0)