libc++: implement uses-allocator construction
howard.hinnant at gmail.com
Wed Sep 11 18:52:39 PDT 2013
On Sep 10, 2013, at 11:19 AM, Marshall Clow <mclow.lists at gmail.com> wrote:
> Split out from <dynarray>.
> Section 188.8.131.52 (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
Very nice job on a very low level refactoring. I can't find anything to complain about.
Please commit, and thanks!
More information about the cfe-commits