Jump to content
  • Advertisement


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


Template functions

This topic is 5732 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 take it that specifying a constant data item as a template argument only applies to template classes. e.g: When I provide int x as an argument between the <> brackets and call the function twice with different values for x the compiler only creates one function using only one constant value for x. Could anyone tell us why? Cheers. [edited by - philscott on November 10, 2002 3:59:25 PM]

Share this post

Link to post
Share on other sites
Two possibilities come to mind immediately:
1) You have a non-compliant (broken) compiler.
2) One of the calls is being optimized away.

Without seeing more context on the problem (e.g. code) its hard to say which is true, or if a third reason might exist.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!