Concept-check bug ?

Peter Dimov pdimov@mmltd.net
Fri Jun 17 12:11:00 GMT 2005


Jonathan Wakely wrote:
> Hi y'all,
> 
>    #define _GLIBCXX_CONCEPT_CHECKS
>    #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 ?

It's illegal (17.4.3.6/2 last bullet), but useful.



More information about the Libstdc++ mailing list