template constexpr T pi = T(3.141592653589793238462643383); template<> constexpr const char* pi = "pi"; template constexpr S multi_arg = T(1) + S(2); template T mutable_val = T(7); struct Foo { template static T bar; }; template T Foo::bar = T(0); int no_template = 9; template void access_generically(T val) { T pi_t = pi; mutable_val = val; Foo::bar = val; no_template = 123; } template void access_generically_multi() { S multi_arg_s = multi_arg; } void access_concretely() { float pi_f = pi; int pi_i = pi; float multi_arg_a = multi_arg; int multi_arg_b = multi_arg; mutable_val = 8; mutable_val = 9; Foo::bar = 1; Foo::bar = 3.14; no_template = 234; } int main() { access_generically(1.0f); access_generically(1); access_generically_multi(); access_generically_multi(); access_concretely(); }