[cfe-dev] [libc++] use of allocator_traits

Axel Naumann via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 12 02:20:56 PDT 2018


Hi,

I'm confused by libc++'s use of allocator_traits, for instance in
vector:898:
    __alloc_traits::__construct_backward(this->__alloc(),
this->__begin_, this->__end_, __v.__begin_);

The standard seems to not require the existence of a member called
__construct_backward. Seemingly standard-conforming, user provided
specializations of this trait (for a user provided allocator) thus fail
to compile.

Am I misinterpreting allocator_trait as a customization point?

Cheers, Axel.


More information about the cfe-dev mailing list