[cfe-dev] deque<Incomplete Type> support

Zhihao Yuan zy at miator.net
Tue Nov 12 09:35:01 PST 2013


is broken, while libstdc++ supports it.

  struct A {
    deque<A> q;
  };

I regard this as a QoI issue, and a somewhat important one.
1. vector, map support it; 2. no workaround unless discarding
user's intended API.

An simple fix is to replace the constant __block_size with
a functor (delay the use of sizeof()), then compiler will optimize
the function call out -- this works for c++03 as well, but results
in ABI breakage, while I see no fix involves no ABI change.

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/



More information about the cfe-dev mailing list