~/talk

C++ Concepts

Talkat Meeting C++ 2024 · 2024-11-14..11-16· [typescript]
slides:none on file

C++20 Concepts let generic code state actual constraints so overload resolution and diagnostics improve: use requires clause and named concepts to pick push_back versus insert, constrain auto and class members, and subsume specializations (random_access_range wins over input_range). Testing is compile-time via static_assert tests and compile-time if branches. Standard helpers like std::ranges::range and remove_cvref appear; examples include a prime-size non-type template that fails to compile and clearer clang/GCC constraint diagnostics, while runtime semantics remain only documented.

AI-written summary · about

  1. 0:00C++20 Concepts intro
  2. 7:30Generic insertion with Concepts
  3. 21:00Testing Concept definitions
  4. 30:34Requires clauses
  5. 38:24Concept hierarchies
  6. 51:39Where Concepts apply
  7. 1:00:42Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.