
On 4/6/12 12:45 PM, ivan.lelann@free.fr wrote:
Clearly, if you do not find requiring of the programmers to type this "typename" in these places even slightly wrong, you will not appreciate alias templates as a useful addition to meta-programming. Also, if you did a lot of advanced meta-programming, you have probably mastered the rules of template syntax, and find it difficult to sympathize with those that did not master the subject.
But looking at it from the fresh programmer's perspective, the fact that the language requires "to specify whenever dependent names in template contexts are anything else than values" means that the language is not friendly to the fresh programmers (I understand that there are good reasons for requiring this, but still...).
Based on the Wkipedia's definition of "gotcha" (...)
(off-topic) IMHO, a gotcha leading only to a compile time error is not really a gotcha.
The problem is that VC with its non two phase lookup often doesn't require it, and compiles fine without. I can't count the times I had to fix broken check-ins from our Windows developers, who fell into exactly this gotcha. regards Fabio