[PATCH] D48753: [libcxx] Use custom allocator's `construct` in C++03 when available.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 28 18:18:53 PDT 2018
vsapsai added a comment.
In https://reviews.llvm.org/D48753#1147500, @Quuxplusone wrote:
> I'm pretty sure that the C++03 standard doesn't permit the implementation to call any `construct` method here, even if it wanted to. And this adds a couple hundred LOC to get that (non-standard) behavior. Is there a specific use-case that you're trying to enable by adding this behavior to libc++?
Only the standard behaviour is required, so I need only
template <class _Tp, class _A0>
static void construct(allocator_type& __a, _Tp* __p, const _A0& __a0);
to call allocator's `construct`. Other `construct` methods with different number of parameters were changed only for completeness. Also I'm thinking that using available matching allocator methods is something that developers would expect. But I don't think this opinion should influence decisions because seems there is no much use for custom `allocator_type::construct`.
If nobody thinks all variadic cases should be supported, I'll clean that up.
https://reviews.llvm.org/D48753
More information about the cfe-commits
mailing list