Andrew K wrote:
I thought VC7 was correct initially too, but then read some google
postings that said the two versions I showed should be equivalent,
but it was in the context of a char(which should make no different
I'd think). I also tried it in gcc and it accepted both versions,
which was why I asked.
The C++ standard is actually quite specific on it. Section 8.3.4, paragraph
1 says:
<quote>
In a declaration T D where D has the form
D1 [constant-expression-opt]
and the type of the identifier in the declaration T D1 is
"derived-declarator-type-list T," then the type of the
identifier of D is an array type. T is called the array element type; this
type shall not be a reference type, the
(possibly cv-qualified) type void, a function type or an abstract class
type. ...
</quote>
VC7 and 7.1 are correct in rejecting it. In the cases where it's legal, the
two parameter lists that you showed are effectively identical - the array
syntax is simply not legal for abstract classes.
-cd