Intermediate C++
Q86 / 100

What are C++20 concepts used for vs SFINAE in terms of readability?

Correct! Well done.

Incorrect.

The correct answer is B) Concepts produce readable compiler error messages and cleaner constraint syntax, while SFINAE produces cryptic template instantiation errors

B

Correct Answer

Concepts produce readable compiler error messages and cleaner constraint syntax, while SFINAE produces cryptic template instantiation errors

Explanation

template<Numeric T> T add(T a, T b) produces "T does not satisfy Numeric" errors. SFINAE equivalent produces a multi-line template instantiation failure trail.

Progress
86/100