On Wednesday 21 October 2009 02:58:42 Ireneusz Szpilewski wrote: > Current status of void is somewhat strange. It is a type but you cannot > create objects of type void. > So, it is type of what? But you can have memory pointer to void, so > object (or array) of type void > has its memory position but cannot be here created. Pointer arithmetics > for void* is forbidden. > Despite this all, we are allowed to use void as a template type > parameter. It is not elegant and > makes C/C++ harder to understand for beginners.
void is, by definition, an "incomplete type". That explains all why you said. Re-read the C++ norm about incomplete types. If, after that read, you still feel the need to discuss, find out a mailing list, a forum, or a Usenet group, about C++. gcc@gcc.gnu.org is not the right list for such a discussion.