Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


The typename keyword.

This topic is 5720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I never really understood WHAT this keyword does, even after reading some technical info on MSDN. Can someone give me an example where typename actually resolves a name ambiguity?

Share this post

Link to post
Share on other sites
Alright, that all makes sense now, thanks...

And as it turns out, even if a type is derived from a base class, you need to use the typename keyword when refering to that type...

I think this is a bug in GCC 3.2 i just found =/... (I'm deriving from the std::unary_function class, which has a typedef argument_type), when I use argument_type in my class, it says "implicit typename is deprecated", and if I add the typename keyword in front, it says its a parse error.. but it works properly if i say "typename unary_function::argument_type", but I shouldn't have to say it's from unary_function, because I'm deriving from it...

Is this actually a bug, should I report it to the GNU peeps?

[edited by - Brobanx on October 22, 2002 12:55:29 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!