Incomplete type is not allowed in a class, but is allowed in a class template – stackoverflow.com

The following is invalid code: struct foo { struct bar; bar x; // error: field x has incomplete type struct bar{ int value{42}; }; }; int main() { return foo{}.x.value; } This is ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Incomplete type is not allowed in a class, but is allowed in a class template – stackoverflow.com"