Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If it is not SomeType, then ::name is a typedef for int and the parse tree is declaring a pointer-to-int named x.

Doesn't this require "typename" at the beginning of the line?



No, not in this instance. typename is needed to mark dependent names as types, but you can only have dependent (i.e. on a template parameter) names within templates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: