Question 11
Back to Exercise
What do C++20 concepts add to templates?
- A Virtual dispatch
- B Named compile-time requirements on template arguments, with clearer errors Correct
- C Garbage collection
- D Run-time type checks
Correct Answer: Option B
A concept is a compile-time interface: template <Sortable T> says exactly what T must support.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!