Skip to content

Instantly share code, notes, and snippets.

@asa55
Created April 3, 2020 21:00
Show Gist options
  • Save asa55/321602766f94ada7d4389f330a679d35 to your computer and use it in GitHub Desktop.
Save asa55/321602766f94ada7d4389f330a679d35 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
template <typename T>
T square (T x) {
return x*x;
}
int main() {
cout << (5<4 ? "T" : "F") << endl;
cout << square(5.5) << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment