The following code generates a compile error in Xcode:
template struct Foo { Foo(T Value) { } }; int main() { Foo MyFoo(123);
What you are trying to do now works in C++ 17. Template parameters can be inferred in C++ 17.
template <typename T> struct Foo { Foo(T Value) { } }; int main() { Foo a(123); Foo b = 123; Foo c {123}; return 0; }