![]() | This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
Partial template specialization is a method of optimizing generic code at compile time.
Total bullshit, its not for optimizing for for taking care of special abilities, e.g. that its a pointer, or that for type X some access to whatever is done otherwise. what about informing before writing,
as opposed to explicit specialization, where all the template arguments are provided
In the first paragraph, maybe you intended to say "full specialization" instead of "explicit specialization" —Preceding unsigned comment added by 77.234.79.113 ( talk) 13:01, 13 February 2008 (UTC)
I don't think this line is correct :
// legal: base function template overloading the return type
template <typename ArgumentType>
void Foo(ArgumentType arg);
Return type is not used for the function signature in C++.
109.89.54.237 ( talk) 16:18, 3 May 2015 (UTC)
The following is a valid overload since arg has a type char.
// legal: base function name reused. Not considered an overload. ill-formed: non-overloadable declaration (see below)
template <typename ReturnType>
ReturnType Foo(char arg) { return "Return2"; }
![]() | This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
Partial template specialization is a method of optimizing generic code at compile time.
Total bullshit, its not for optimizing for for taking care of special abilities, e.g. that its a pointer, or that for type X some access to whatever is done otherwise. what about informing before writing,
as opposed to explicit specialization, where all the template arguments are provided
In the first paragraph, maybe you intended to say "full specialization" instead of "explicit specialization" —Preceding unsigned comment added by 77.234.79.113 ( talk) 13:01, 13 February 2008 (UTC)
I don't think this line is correct :
// legal: base function template overloading the return type
template <typename ArgumentType>
void Foo(ArgumentType arg);
Return type is not used for the function signature in C++.
109.89.54.237 ( talk) 16:18, 3 May 2015 (UTC)
The following is a valid overload since arg has a type char.
// legal: base function name reused. Not considered an overload. ill-formed: non-overloadable declaration (see below)
template <typename ReturnType>
ReturnType Foo(char arg) { return "Return2"; }