libc++: implement uses-allocator construction
Marshall Clow
mclow.lists at gmail.com
Tue Sep 10 08:19:46 PDT 2013
Split out from <dynarray>.
Section 20.8.7.2 (at least in N3691)
Howard wrote:
> However when I just now tried to do so, I created circular header dependencies. After investigating further, adding <new> to <__functional_base> isn't so bad. Everything <new> includes is already included by <__functional_base>. So <__functional_base> only swells by the immediate contents of <new> which is pretty small.
>
> In summary, my suggestion is:
>
> * Add #include <new> to <__functional_base>
>
> * Move allocator_arg_t, __uses_alloc_ctor, __user_alloc_construct to <__functional_base>.
and then:
> __user_alloc_construct and __user_alloc_construct_impl needs decoration with inline _LIBCPP_INLINE_VISIBILITY.
>
> Case 0 of __user_alloc_construct_impl, remove unused argument name "__a".
Did all that :-)
-- Marshall
Marshall Clow Idio Software <mailto:mclow.lists at gmail.com>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uses-alloc.patch
Type: application/octet-stream
Size: 5318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130910/e3738e29/attachment.obj>
More information about the cfe-commits
mailing list