Possible Duplicate:
C++0x decltype and the scope resolution operator
Compiling next example using g++ 4.6.1:
#include <iostream>
struct A
{
static const int v = 1;
};
int main()
{
A a;
std::cout << decltype(a)::v << std::endl;
}
will produce next compiling errors:
error: expected primary-expression before 'decltype'
error: expected ';' before 'decltype'
Is this according to the standard? Or, is it a g++'s quirk?