~/talk

The Three Layers of Headers A Curious Discovery

Talkat CppCon 2017 · 2017-09-24..09-29· [rust]
links:none on file
slides:none on file

Claim: any header can be decomposed into three layers of headers — a top layer of forward declarations, a middle interface file with type and free‑function declarations, and a bottom layer of inline implementations and globals. Doing this breaks cyclical include chains (example: two classes A and B that refer to each other) and compiles cleanly, reduces unnecessary includes, and already appears in practice via iosfwd and in unit test libraries like doctest.

AI-written summary · about

  1. 0:00Start
  2. 0:05The Three Layers of Headers A Curious Discovery
  3. 0:37fails to compile...
  4. 1:38What's wrong with Attempt #2?
  5. 1:48Let's step back...
  6. 2:08Let's define dependencies of types, and member functions
  7. 2:28There appears to be three layers
  8. 2:52A Library Can Be Provided by Three Headers and One Source File
  9. 3:54The Three Layers of a Library
  10. 4:04Viktor Kirilov 'doctest' vs. 'catch' Compile Times
  11. 4:25Library authors, refactor your
  12. 4:52IOStreams Provides Forward Declarations
~/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.