Template functions
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]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement