P
Patrick Kowalzick
Dear all,
Is the default parameter for t in the function foo guaranteed to be NULL in
the case below ?
(MSVC 7.1 and g++ implements it like that)
#include <iostream>
template <typename T>
void foo(const T & t = T())
{
std::cout << t << std::endl;
}
int main()
{
foo<void*>();
return 0;
}
Thanks,
Patrick
Is the default parameter for t in the function foo guaranteed to be NULL in
the case below ?
(MSVC 7.1 and g++ implements it like that)
#include <iostream>
template <typename T>
void foo(const T & t = T())
{
std::cout << t << std::endl;
}
int main()
{
foo<void*>();
return 0;
}
Thanks,
Patrick