Concept-check bug ?

Gabriel Dos Reis
Fri Jun 17 12:20:00 GMT 2005

Jonathan Wakely <> writes:

| Hi y'all,
|     #include <vector>
|     struct A {
|         std::vector<A> v;
|     };
| This produces concept-check errors because A is incomplete at the point
| of declaring v.
| Is this code really illegal, or just a flaw in the concept-checks ?

I think it is invalid (how can T be CopyConstructible if it is not
complete?), which annoys me more often than not.  I always 
forget to raise the issue with LWG.  It is ridiculous.

-- Gaby

More information about the Libstdc++ mailing list