Skip to content

Commit d08023d

Browse files
add constexpr cpp26
1 parent f95216d commit d08023d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcxx/include/__tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,24 +1332,24 @@ private:
13321332
public:
13331333
using pointer = __node_pointer;
13341334

1335-
_LIBCPP_HIDE_FROM_ABI __tree_deleter(__node_allocator& __alloc) : __alloc_(__alloc) {}
1335+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree_deleter(__node_allocator& __alloc) : __alloc_(__alloc) {}
13361336

13371337
#ifdef _LIBCPP_COMPILER_CLANG_BASED // FIXME: GCC complains about not being able to always_inline a recursive function
13381338
_LIBCPP_HIDE_FROM_ABI
13391339
#endif
1340-
void
1340+
_LIBCPP_CONSTEXPR_SINCE_CXX26 void
13411341
operator()(__node_pointer __ptr) {
13421342
if (!__ptr)
13431343
return;
13441344

1345-
(*this)(static_cast<__node_pointer>(__ptr->__left_));
1345+
(*this)(std::__static_fancy_pointer_cast<__node_pointer>(__ptr->__left_));
13461346

13471347
auto __right = __ptr->__right_;
13481348

13491349
__node_traits::destroy(__alloc_, std::addressof(__ptr->__value_));
13501350
__node_traits::deallocate(__alloc_, __ptr, 1);
13511351

1352-
(*this)(static_cast<__node_pointer>(__right));
1352+
(*this)(std::__static_fancy_pointer_cast<__node_pointer>(__right));
13531353
}
13541354
};
13551355

0 commit comments

Comments
 (0)