<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 3:20 AM, Axel Naumann via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm confused by libc++'s use of allocator_traits, for instance in<br>
vector:898:<br>
    __alloc_traits::__construct_<wbr>backward(this->__alloc(),<br>
this->__begin_, this->__end_, __v.__begin_);<br>
<br>
The standard seems to not require the existence of a member called<br>
__construct_backward. Seemingly standard-conforming, user provided<br>
specializations of this trait (for a user provided allocator) thus fail<br>
to compile.<br>
<br>
Am I misinterpreting allocator_trait as a customization point?<br></blockquote><div><br></div><div>I would have thought so, because my understanding was that the allocator</div><div>was the customization point, where as allocator_traits was the interface used</div><div>to deal with the custom allocator.</div><div><br></div><div>However, the standard seems to disagree with me, noting that users</div><div>may specialize `allocator_traits`.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers, Axel.<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div></div>