[Bug c++/95797] New: Can std::allocator.deallocate newed pointer during constant evaluation
johelegp at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jun 21 03:14:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95797
Bug ID: 95797
Summary: Can std::allocator.deallocate newed pointer during
constant evaluation
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/TxPbdC.
```C++
#include <memory>
static_assert(
(std::allocator<int>{}.deallocate(new int[1], 1),
true));
```
According to https://timsong-cpp.github.io/cppwp/n4861/allocator.members#6, the
argument "is a pointer value obtained from `allocate()`".
More information about the Gcc-bugs
mailing list