template< typename T >
constexpr T max( T a, T b ) { return a > b ? a : b; }
I know Linus is afraid of the typical/“modern” C++ crowd killing his codebase, but you don’t have to write C++ like that. You can write your normal C, just with templates/constexpr functions instead of junky macro hacks like this.
In C++ this is
I know Linus is afraid of the typical/“modern” C++ crowd killing his codebase, but you don’t have to write C++ like that. You can write your normal C, just with templates/constexpr functions instead of junky macro hacks like this.
I was thinking the same thing.
There are plenty of arguments against C++, but it’s silly to rage against C++ and then allow code like this.