Question 18
Back to Exercise
What is the Curiously Recurring Template Pattern (CRTP)?
- A A recursive template function
- B A class deriving from a base template instantiated with itself (class D : Base<D>), letting the base call derived functions at compile time Correct
- C Virtual inheritance with templates
- D A pattern for recursion
Correct Answer: Option B
It gives static polymorphism without vtables, at the cost of a fixed set of types per base instantiation.
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!