[PATCH] [libc++] Make std::deque instantiable with incomplete element type

Peter Collingbourne peter at pcc.me.uk
Tue Oct 1 18:41:26 PDT 2013

On Sat, Sep 21, 2013 at 06:11:49PM -0400, Howard Hinnant wrote:
> On Sep 21, 2013, at 5:53 PM, Chandler Carruth <chandlerc at google.com> wrote:
> > 
> > On Sat, Sep 21, 2013 at 2:48 PM, Howard Hinnant <howard.hinnant at gmail.com> wrote:
> > 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.
> > 
> > Ouch.
> > 
> > Do you see any path forward here or solution to preserve ABI? We ran into a nontrivial amount of code which ended up relying on this.
> The easiest thing I can think of is to wait until libc++ is ready to make ABI breaking changes across the board, and then increment _LIBCPP_ABI_VERSION.
> I've wondered if Peter's fix would work if we gratuitously restored the unneeded template parameter on __deque_iterator just for the purpose of ABI stability.  I don't know the answer to this question, and won't personally have time to investigate it at this time.

This won't work straightforwardly because the compiler will
instantiate the iterator and const_iterator typedefs when it
instantiates std::deque, forcing the block size parameter to
be evaluated.

I have broader thoughts on ABI transitions in libc++ and have started
a new thread to discuss them.


More information about the cfe-commits mailing list