Skip to content

Commit 187b86f

Browse files
insert_and_emplace_allocator_requirements.pass.cpp passes
1 parent d8d6278 commit 187b86f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libcxx/include/__tree

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,13 @@ __tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&&... __args) {
20012001
#if _LIBCPP_STD_VER >= 26
20022002
if(__libcpp_is_constant_evaluated()) {
20032003

2004-
__node_traits::construct(__na, std::addressof(*__h), std::forward<_Args>(__args)...);
2004+
// fails-> insert_and_emplace_allocator_requirements.pass.cpp
2005+
// __node_traits::construct(__na, std::addressof(*__h), std::forward<_Args>(__args)...);
2006+
// std::__construct_at(std::addressof(*__h), __na, std::forward<_Args>(__args)...);
2007+
2008+
// TODO: check if this is correct, or we need to allocate more
2009+
std::__construct_at(std::addressof(*__h), std::forward<_Args>(__args)...);
2010+
20052011
// note: construction of subobject of object outside its lifetime is not allowed in a constant expression
20062012

20072013
// we do need to

0 commit comments

Comments
 (0)