As a follow-up to " What is this crazy C++11 syntax ==> struct : bar {} foo {};? ", I'd expect the following C++0x code to compile:
struct x {};
struct :::x {} y {};
However, GCC 4.7.0 20110731 tells me:
error: global qualification of class name is invalid before ':' token
And when I take a step back towards sanity and give the second UDT a name:
struct x {};
struct a:::x {} y{}; // remember, identical to `a::: x` or `a: ::x` or `a:: :x` etc
the error is:
error: 'a' has not been declared
It seems like the three colons are being lexed like <::> <:>
rather than <:> <::>
, but can this clearly be deduced from the [final draft] standard?
And might the question " Global qualification in a class declarations class-head " be related?