[cfe-dev] Heads up - Allocator value_type vs container value_type
Marshall Clow via cfe-dev
cfe-dev at lists.llvm.org
Wed Nov 25 17:27:20 PST 2015
On Tue, Nov 24, 2015 at 2:21 PM, Marshall Clow <mclow.lists at gmail.com>
wrote:
> The C++ standard requires that the value_type of an allocator match the
> value_type of the container that uses that allocator. (table 98, first row).
>
> libc++ has, for a long time, caused a compile-time failure if this is not
> true for many containers (list, string, unordered_[multi]map,
> unordered_[multi]set and vector), but not for all of them.
> Specifically, deque, forward_list, [multi]map and [multi]set are missing
> this check.
>
> I will be adding these checks very soon (tomorrow). These will turn
> run-time undefined behavior into a compile time error.
>
> Committed as revision 254119.
-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151125/97eca49c/attachment.html>
More information about the cfe-dev
mailing list