4 ms·
You have static_assert for testing/debugging. The lovely thing about compile-time programming is you don't even need a separate test stage; the compiler runs yo
by logicchains 3y ago
You have static_assert for testing/debugging. The lovely thing about compile-time programming is you don't even need a separate test stage; the compiler runs your tests (asserts) for you. Then if the code builds you know it's correct.
This pattern is getting easier and easier in modern C++ as more and more thing are made constexpr.