#include "stdafx.h"
#include <iostream>
using namespace std;
class Foo {
public:
Foo()
{
}
template < typename T >
Foo( const T & a )
{
cout << a << endl;
}
Foo<float>( const float & a )
{
cout << a << endl;
}
};
int main(int argc, char* argv[])
{
Foo foo;
float a = 0.5f;
foo = Foo<float>( a );
foo = Foo( "dfadfdafsa" );
return 0;
}
#include <iostream>
using namespace std;
class Foo {
public:
Foo()
{
}
template < typename T >
Foo( const T & a )
{
cout << a << endl;
}
Foo<float>( const float & a )
{
cout << a << endl;
}
};
int main(int argc, char* argv[])
{
Foo foo;
float a = 0.5f;
foo = Foo<float>( a );
foo = Foo( "dfadfdafsa" );
return 0;
}