The following code generates a compile error in Xcode:
template struct Foo { Foo(T Value) { } }; int main() { Foo MyFoo(123);
It makes a lot of sense it is like this, as Foo is not a class, only Foo where T is a type.
Foo
In C++0x you can use auto, and you can create a function to make you a Foo, let's call it foo (lower case f). Then you would do
template Foo foo(int x) { return Foo(x); } auto myFoo = foo(55);