So there I was reading about the implementation of lambda calculus with template metaprograms, one proof of TMP's Turing-completeness.
As I was reading through the source code I stumbled on one (and then more) lines like the following :
template <int Name, typename Value, typename Env>
struct EnvLookup <Name, Binding<Name,Value,Env> >
{
Value typedef result ; // Line 84, what is this ?
} ;
I'm used to typedef Type Alias;
, but Type typedef Alias;
looks alien to me. And still it compiles fine with g++ 4.9.0 and good old -std=c++98
.
I could not find any documentation on this syntax with Google, nor here on SO. Is this standard-compliant ? A g++ extension perhaps ? Will it blend ?