|
I mean, apparently this is confusing, but yes, obviously. If your Commodore 64 template is dealing with say, foozles that might be 8-byte, 12-byte or 16-byte, the complexity incurred is pretty small, bugs with foozle<16> are likely to be something mere mortals can understand and fix. On a more complicated system like a cloud Linux setup the template may be for foozles that can be in any colorspace and on a remote machine or locally, and now sometimes the bug with foozle<HSV,remove> involves a fifty line error message because the compiler doesn't realise all that happened is you meant to write foozle<HSV,remote> ... It's not even as if the C++ committee isn't aware that templates are a problem. Remember template meta-programming wasn't really intended from the outset, and a big part of the point of Concepts was to at last let you write code that compilers can provide readable errors for when it's wrong. |
https://developer.apple.com/documentation/driverkit
https://docs.microsoft.com/en-us/cpp/build/reference/kernel-...
https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/...
https://genodians.org/nfeske/2019-01-22-conscious-c++