[Bug c++/95788] New: std::ranges::construct_at's placement new not intercepted
johelegp at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 20 17:47:08 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95788
Bug ID: 95788
Summary: std::ranges::construct_at's placement new not
intercepted
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: johelegp at gmail dot com
Target Milestone: ---
See https://godbolt.org/z/diWS5T.
```C++
#include <memory>
constexpr void f()
{
const int sz{1};
int* data{std::allocator<int>{}.allocate(sz)};
std::ranges::construct_at(data, 42);
std::ranges::destroy(data, data + sz);
std::allocator<int>{}.deallocate(data, sz);
}
constexpr int x{(f(), 0)};
```
Other stuff in `bits/ranges_uninitialized.h` may be similarly affected.
More information about the Gcc-bugs
mailing list