SantoshNarayan
Technical User
I recently came through a very strange piece of text in some book which claimed that Template functions expand inline. Is this true though I highly doubt it ?
template<typename mytype>void func(mytype val)
{
cout<<"This is a simple template function "<<val<<endl;
}
int main()
{
func(11);
func(5.79);
func('S');
return 0;
}
That piece of text claimed that each of the above functions would expand inline within main(). I doubt it.
template<typename mytype>void func(mytype val)
{
cout<<"This is a simple template function "<<val<<endl;
}
int main()
{
func(11);
func(5.79);
func('S');
return 0;
}
That piece of text claimed that each of the above functions would expand inline within main(). I doubt it.