According to C ++ standard ,
A non-type template-parameter shall have one of the following (optionally cv-qualified) types: — integral or enumeration type, — pointer to object or pointer to function, — reference to object or reference to function, — pointer to member. A non-type template-parameter shall not be declared to have floating point, **class**, or void type.
Obviously, any std-compatible compiler throws an error if you declare a non-template argument.
jRJ
source share