| Issue |
56437
|
| Summary |
std::allocator deallocate fails to check validity of second parameter
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
beached
|
In constexpr code the following will successfully compile when it should not as it fails the precondition check of [deallocate allocator.requirements.general#48.2](http://eel.is/c++draft/allocator.requirements.general#48.2)
```c++
std::allocator<int> alloc;
int* p = alloc.allocate(5);
alloc.deallocate(p, 2);
```
https://godbolt.org/z/83M34ba9v
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs