Intermediate C++
Q51 / 100

What does std::enable_if do?

Correct! Well done.

Incorrect.

The correct answer is B) Conditionally enables or disables a template based on a boolean condition using SFINAE

B

Correct Answer

Conditionally enables or disables a template based on a boolean condition using SFINAE

Explanation

std::enable_if<std::is_integral<T>::value, T>::type restricts a template to integral types, removing non-matching specializations from overload resolution.

Progress
51/100