fork download
  1. #include <iostream>
  2.  
  3. template< typename T >
  4. void DoSomething( T &v1)
  5. {
  6. std::cout << "Sum<Type>(Type)" << std::endl;
  7. }
  8.  
  9. // Overload
  10. void DoSomething( double &v1)
  11. {
  12. std::cout << "Sum(double)" << std::endl;
  13. }
  14.  
  15. int main()
  16. {
  17. float myFloat = 357;
  18. DoSomething(myFloat);
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
Sum<Type>(Type)