template fails to compile: 'double' is not a valid type for a template constant parameter
The only numeric types valid for a nontype template parameter are integers and enumerations. So, you can't have a nontype template parameter of type double
.