As per http://en.cppreference.com/w/cpp/language/type_alias, aliases are block-level declarations. It doesn't say anything special about template aliases, so it should be read that template aliases are block-level declarations as well.
However, it is impossible to use template aliases at block level. The errors are different depending on the compiler - while g++ gives a meaningful message, saying that templates are not allowed at block scope, clang is completely cryptic. (example: http://coliru.stacked-crooked.com/a/0f0862dad6f3da61).
Questions I have so far:
- Does cppreference fail to specify that template aliases can not be used at block scope? (Or do I need to take a reading course?)
- Are the compilers correct in denying template aliases on block level (the feature I find very interesting for my particular coding habits)
- If the answer to the second is Yes, what might be the rationale for this? Why would compiler deny me this pure syntax sugar?