N
Neelesh Bodas
Hello all,
Is there a way to pass an object of local type to a template?
template <class T> int fun(const T& x) { return 1; }
int bar()
{
enum Color { Red, Green, Blue};
Color c;
fun(c); // Error, Color is local to bar()
}
Is there a way to pass an object of local type to a template?
template <class T> int fun(const T& x) { return 1; }
int bar()
{
enum Color { Red, Green, Blue};
Color c;
fun(c); // Error, Color is local to bar()
}