Foundations 0/223

Foundations

C++ classes and templates

Virtual dispatch, overriding and overloading, templates, constexpr and lambdas: the tools for code that is generic and still fast. Type erasure combines them, which is why it comes last here.

0 / 2 problems solved 0 / 37 questions solved

Questions

0/37 solved
Question Module Tags Difficulty Success
1. Class with a pure virtual Polymorphism & Inheritance
Design PatternsBasics
Easy 74%
2. Construction and Destruction Order in Inheritance Polymorphism & Inheritance
construction_orderdestruction_order +3
Medium 82%
3. override Keyword Polymorphism & Inheritance
overrideconst_mismatch +3
Medium 72%
4. Base Only Polymorphism & Inheritance
object_slicingpolymorphism +1
Medium 55%
5. Virtual Call in Constructor Polymorphism & Inheritance
virtual_in_constructorvptr +2
Medium 51%
6. Private Inheritance Polymorphism & Inheritance
private_inheritanceis_a +3
Medium 73%
7. Reborn Anew Polymorphism & Inheritance
covariant_returnvirtual +3
Medium 63%
8. Two Paths Up Polymorphism & Inheritance
diamond_problemvirtual_inheritance +2
Medium 79%
9. Operator Overloading: Member vs Non-Member Polymorphism & Inheritance
operator_overloadingmember_vs_nonmember +2
Medium 47%
10. Which Lines Are Rejected Polymorphism & Inheritance
final-specifieroverride +2
Medium 88%
11. Trusted Versus Checked Polymorphism & Inheritance
dynamic-caststatic-cast +2
Medium 75%
12. Hidden By The Derived Polymorphism & Inheritance
name-hidingoverload-resolution +2
Hard 84%
13. Vptr Not Ready Yet Polymorphism & Inheritance
vtablevirtual-dispatch +2
Hard 91%
14. Hidden Not Overridden Polymorphism & Inheritance
overridename-hiding +2
Hard 42%
15. Static Type Picks The Default Polymorphism & Inheritance
virtual-dispatchdefault-arguments +2
Hard 38%
16. How Many Copies Templates & Metaprogramming
template_instantiationcode_generation +2
Medium 89%
17. Show the Whole Spell Templates & Metaprogramming
templatesheaders +3
Medium 95%
18. C++20 Concepts Templates & Metaprogramming
conceptssfinae +3
Medium 80%
19. What Type Did You Mean Templates & Metaprogramming
Basics
Medium 38%
20. Quiet Failure Templates & Metaprogramming
sfinaeoverload_resolution +2
Medium 85%
21. Best Match Wins Templates & Metaprogramming
Basics
Hard 57%
22. Dependent Name Hunt Templates & Metaprogramming
template_inheritancename_resolution +3
Hard 74%
23. Ancestor Echo Templates & Metaprogramming
template_inheritancename_resolution +3
Hard 63%
24. The Greedy Constructor Templates & Metaprogramming
forwarding-referencesoverload-resolution +2
Hard 75%
25. Three Calls Templates & Metaprogramming
Basics
Insane 41%
26. Compile Time Maybe Compile-time & constexpr
constexprcompile_time +1
Medium 76%
27. Which Line Refuses Compile-time & constexpr
constexprconsteval +2
Medium 73%
28. Catch It Early Compile-time & constexpr
static_assertcompile_time +1
Easy 94%
29. The Branch Nobody Runs Compile-time & constexpr
if-constexprtemplates +2
Medium 64%
30. Old Magic, New Magic Compile-time & constexpr
tmpconstexpr +1
Medium 53%
31. Compile-time branch Compile-time & constexpr
Basics
Medium 82%
32. Lambda capture by value timing Lambdas & Closures
Basics
Easy 69%
33. Lambda capture by value Lambdas & Closures
Basics
Easy 81%
34. Lambda capture dangling reference Lambdas & Closures
Memory ManagementBasics
Medium 81%
35. Mutable Lambda Lambdas & Closures
lambdamutable +2
Medium 58%
36. Generic Lambda Lambdas & Closures
lambdageneric_lambda +2
Medium 62%
37. IIFE Lambdas & Closures
lambdaiife +2
Medium 60%