Here\'s a bit of code that might seem like it would work:
#include #include enum test { A = 1 }; int main() { int max =
For non-specialized versions of the template, max returns T(). You have not written a numeric_limits specialization for your test type, so you get the default implementation.
max
T()
numeric_limits
test