~/lightning

Lightning Talk: How Hard Can it be to SFINAE in C++03?

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

Demonstrates a portable C++03 SFINAE shim that detects either an ostream operator or a void print function at compile time with no runtime overhead, using a sizeof trick to cause substitution failures, pointer-to-member return extraction to verify void returns, and recursive priority tag dispatch to force overload order. Implements manual true/false types and enable-if logic, compiles on clang, GCC, Sun Studio and xlc, and works except it doesn’t handle overloaded print functions.

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.