Which of the following are incorrect template declarations?
Explanation
Template parameters can only be types, enumerated type values, pointers, and references. double is not an enumerated type.
From the standard: 14.1 Template parameters
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 a function,
— reference to object or reference to a function,
— pointer to member.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes