Skip to content

Commit d8095a7

Browse files
fix placement new to use std::addressof
1 parent 1d9e310 commit d8095a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ private:
13581358
// const_cast is not allowed at constexpr time.
13591359
// we get around this by deleting and creating a new node value
13601360
__lhs.~foo_type();
1361-
new (&__lhs)(foo_type) (tmp);
1361+
new (std::addressof(__lhs))(foo_type) (tmp);
13621362
// __lhs = std::move(tmp);
13631363
} else {
13641364
// This is technically UB, since the object was constructed as `const`.

0 commit comments

Comments
 (0)