2007-09-24 07:40:32 +00:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
template<class T>
|
|
|
|
void foo(T i)
|
|
|
|
{
|
|
|
|
std::cout << "hi\n"; // set breakpoint here
|
|
|
|
}
|
|
|
|
|
2009-04-29 22:45:11 +00:00
|
|
|
template<class T>
|
|
|
|
void multi_line_foo(T i)
|
|
|
|
{
|
|
|
|
std::cout // set multi-line breakpoint here
|
|
|
|
<< "hi\n";
|
|
|
|
}
|
|
|
|
|
2007-09-24 07:40:32 +00:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
foo<int>(0);
|
|
|
|
foo<double>(0);
|
|
|
|
foo<int>(1);
|
|
|
|
foo<double>(1);
|
|
|
|
foo<int>(2);
|
|
|
|
foo<double>(2);
|
2009-04-29 22:45:11 +00:00
|
|
|
|
|
|
|
multi_line_foo<int>(0);
|
|
|
|
multi_line_foo<double>(0);
|
|
|
|
|
|
|
|
return 0;
|
2007-09-24 07:40:32 +00:00
|
|
|
}
|