LearnFrenzy
Sign in Take a free test

Abstraction · Abstraction MCQ · Question 11

What do C++20 concepts provide? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links