Skip to main content

Practice ยท 2 of 2

The const-Probe Concept

Implement Sized as an ad-hoc requires requires clause probing c.size() **on a const reference** (with a std::convertible_to<std::size_t> result), and totalIfSized(c) returning the size โ€” or -1 through the fallback for unsatisfying types.

Difficulty: advanced

Back to lesson: Practice: Concept Fundamentals