3 ms·
#4 isn't really magic. It's just a way to let the compiler fill in the blanks with information it already knows. The benefits are debatable for simple, obvious
by cageface 15y ago
#4 isn't really magic. It's just a way to let the compiler fill in the blanks with information it already knows. The benefits are debatable for simple, obvious types but for the hairier generic types you often encounter in C++ it's a godsend.
Of course, the fact that this is so useful might make you wonder if C++'s type system is too complex in the first place.
- JamesLeonis 15y agoOf course it's complex. The template system is Turing complete! http://stackoverflow.com/questions/189172/c-templates-turing-complete http://stackoverflow.com/questions/189172/c-templates-turing...