~/talk

C++ Abstraction Patterns for Cross Platform Development in C++ Software Engineering

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [software-architecture]
links:none on file
slides:none on file

Compares five concrete patterns and their tradeoffs using a two-backend example (DX12 and Vulkan). preprocessor macros produces exponential, unmergeable function bodies and is discouraged. runtime polymorphism gives a clean interface but pays vtable costs and ships all implementations in the binary. PImpl hits ODR unless the build system (CMake) includes exactly one platform source per configuration. A CRP (CRTP-derived, non-templated) pattern removes vtables and pointer indirection but is build-system dependent and hacky. C++20 modules contain platform headers and prevent leakage but struggle with separate module implementation unit visibility.

AI-written summary · about

  1. 0:00Cross-platform abstraction intro
  2. 6:04Pre-processor macros
  3. 8:10Runtime polymorphism
  4. 12:31Pimpl idiom
  5. 17:50Build systems
  6. 23:28CRP without templates
  7. 27:24C++20 modules
  8. 38:43Conclusion
~/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.