~/lightning

Lightning Talk: Global API Injection in C++

Lightningat C++Now 2023 · 2023-05-07..05-12· [c-and-cpp]
slides:none on file

A C++ pattern injects platform-level globals (logging, timing, networking) by specializing a base template so leaf code calls a function that resolves to a variable template or, pre-C++14, a function template with return-type deduction. Clients provide a one-line specialization or accept a default; this eliminates passing APIs through layers, supports testing without I/O redirection, and compiles in C++14 (not C++11). The approach is used in Compiler Explorer examples and in a compile-time build and reports practical success.

AI-written summary · about

~/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.