#include using namespace std; template ::value, T>> class Foo { T x, y; public: Foo() { cout << "x: "; cin >> x; cout << "y: "; cin >> y; } ~Foo() { cout << "Destructor called, nothing to do here."; } T mx() { return (x > y ? x : y); }; }; int main() { Foo bar; cout << bar.mx() << endl; return 0; }