Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Template Specialisations Quiz

Question

Why cannot we use a single template function with specialisations to aggregate all numeric types?

Because floating point and integer types use different representations

Incorrect!

Because these types do not inherit from a common type

Correct!

Because the user could create their own numeric types that we couldn’t account for

Incorrect!

Because they use the C runtime, unlike bool and string which do not exist in C

Incorrect!