[PATCH] [libc++] Make std::deque instantiable with incomplete element type
Howard Hinnant
howard.hinnant at gmail.com
Sat Sep 21 14:48:52 PDT 2013
On Sep 19, 2013, at 1:16 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> This is a QOI improvement to allow std::deque to be instantiated with
> an incomplete element type. The only thing preventing it from being
> so instantiated was the __block_size constant, which this patch moves
> into a constexpr function and calls where necessary.
>
> http://llvm-reviews.chandlerc.com/D1724
>
> Files:
> include/deque
> test/containers/sequences/deque/types.pass.cpp
> <D1724.1.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
I really like this patch. It is a nice piece of work. Unfortunately I think I'm going to have to decline it for ABI reasons. If the client writes code like this:
#include <deque>
void
test(std::deque<int>::iterator);
int
main()
{
test(std::deque<int>::iterator());
}
This patch changes the mangling of the customer's function from:
__Z4testNSt3__116__deque_iteratorIiPiRiPS1_lLl1024EEE
to:
__Z4testNSt3__116__deque_iteratorIiPiRiPS1_lEE
Howard
More information about the cfe-commits
mailing list