Created on 2025-11-01.00:00:00 last changed 1 month ago
Proposed resolution (approved by CWG 2025-11-04):
Change in 7.7 [expr.const] paragraph 14 as follows:
For the purposes of determining whether an expression E is a core constant expression, the evaluation of the body of a member function of std::allocator<T> as defined in 20.2.10.2 [allocator.members],where T is a literal type,is ignored.
(From submission #792.)
Consider:
#include <locale>
#include <memory>
static_assert([]{
auto a = std::allocator<std::locale>{};
a.deallocate(a.allocate(42), 42);
return true;
}());
The type std::locale is not a literal type, yet this is accepted by all implementations.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-07 22:16:49 | admin | set | status: tentatively ready -> ready |
| 2025-11-05 12:07:23 | admin | set | messages: + msg8216 |
| 2025-11-05 12:07:23 | admin | set | status: open -> tentatively ready |
| 2025-11-01 00:00:00 | admin | create | |