Const-incorrect default allocator functions
Both 14882:2003 and the recent draft N2461 declare in
[lib.default.allocator] and [default.allocator], resp.
as well as [lib.allocator.members] and [allocator.members],
resp. the non-static member functions
void construct(pointer p, const T& val);
void destroy(pointer p);
and
void construct(pointer p, const T& val);
template<class... Args> void construct(pointer p, Args&&... args);
void destroy(pointer p);
resp. Comparing these declarations with the table
for Allocator requirements (32 and 40, resp.) and
with the specific member requirements of the
default std::allocator class I see no reasons why
these functions should not be const.
Are there existing implementations where this
change would break something?
Greetings from Bremen,
Daniel KrLgler
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]