Created on 2017-11-11.00:00:00 last changed 56 months ago
Proposed resolution:
This wording is relative to N4700.
Change in [default.allocator] as indicated:
namespace std {
template <class T> class allocator {
public:
using value_type = T;
using propagate_on_container_move_assignment = true_type;
using is_always_equal = true_type;
constexpr allocator() noexcept;
constexpr allocator(const allocator&) noexcept;
constexpr template <class U> allocator(const allocator<U>&) noexcept;
~allocator();
T* allocate(size_t n);
void deallocate(T* p, size_t n);
};
}
[ 2018-3-17 Adopted in Jacksonville ]
[ 2017-11-25 Moved to Tentatively Ready after 7 positive votes for P0 on c++std-lib. ]
std::allocator's constructors should be constexpr. It's expected to be an empty class as far as I know, so this should impose no implementation burden, and it would be useful to permit guaranteed static initialization of objects that need to hold a std::allocator, but don't have to actually use it until after construction.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
| 2018-03-18 16:03:30 | admin | set | messages: + msg9748 |
| 2018-03-18 16:03:30 | admin | set | status: voting -> wp |
| 2018-02-12 01:13:49 | admin | set | status: ready -> voting |
| 2017-11-25 11:20:28 | admin | set | messages: + msg9569 |
| 2017-11-25 11:20:28 | admin | set | status: new -> ready |
| 2017-11-13 20:01:20 | admin | set | messages: + msg9557 |
| 2017-11-11 00:00:00 | admin | create | |