how can the following declaration be expressed with const first (without typedef)?
double* const (&data)[6]
// ?? const double* (&data)[6] // incorrect, elements, not reference, are const
thank you
how can the following declaration be expressed with const first (without typedef)?
double* const (&data)[6]
// ?? const double* (&data)[6] // incorrect, elements, not reference, are const
thank you
You can't do it.
According to the C++ Standard 8.3.2/1:
Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through the use of a typedef (7.1.3) or of a template type argument (14.3), in which case the cv-qualifiers are ignored.