3 ms·
It's not really a bug, but a feature standardised in C++11 to avoid unwanted failures with a trailing template somewhere in your code. But this feature was hija
by jguegant 11y ago
It's not really a bug, but a feature standardised in C++11 to avoid unwanted failures with a trailing template somewhere in your code. But this feature was hijacked to do type checks!
Maybe a better example would be a project that mix different libraries with different to convention for their "to string" methods: obj.toString(), to_string(obj), obj.ToString(), obj.to_string()... Which one would you use if you simply want to ouput your object on std::cout? In that case, a type check would be really handy!
- weland 11y agoHa! Ok, this one makes sense. Thanks!