Very, very nice!
Could even reuse the explicit template parameter for the verbosity level, like:
log<I>(…); // info
log<D>(…); // debugCould even reuse the explicit template parameter for the verbosity level, like:
log<I>(…); // info
log<D>(…); // debug
The second issue is that it seems that default values for non-type template parameters are not evaluated at the instantiation location, but at the definition location, so you need to make the template parameter explicit. This is the best I could come up with:
which prints[1]: [1] https://godbolt.org/z/z1eGc6cM4