#include #include #include "date.h" using namespace std; template void f(T t1) //call copy constructor { T t2(t1); //call copy constructor const T *const p = new T(t2); //call copy constructor cout << t1 << "\t" << t2 << "\t" << *p << "\t" << T(t2) << "\n"; delete p; } enum stooge {moe, larry, curly}; int main() { int i = 10; f(date(date::december, 31, 2014)); f(i); f(&i); f(curly); return EXIT_SUCCESS; }