KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The following code generates a compile error in Xcode: template <typename T> struct Foo { Foo(T Value) { } }; int main() { Foo MyFoo(123); return 0; } error: missing template arguments before 'MyFoo' Changing Foo MyFoo(123); to Foo<int> MyFoo(123); fixes the issue, but shouldn't the compiler be able to figure out the appropriate datatype? Is this a compiler bug, or am I misunderstanding implicit template parameters?
Tags (comma-separated)
Save Edits
Cancel