~/talk

Efficient and Reliable Wrapping of C APIs Using Modern C++

Talkat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp, api-design]
links:none on file
slides:none on file

Case study wraps the C LMDB API into modern C++ using RAII, unique_ptr with custom deleters, and compile‑time configuration to make a read‑only environment type that omits write methods at compile time. It uses C++20/23 features: std::span for byte views, concepts/requires for trait checks, std::to_underlying for flags, and std::expected (or configurable alternatives) for errors. Cursor access becomes an input iterator and view compatible with ranges; implementation avoids virtual calls and heap allocations and is testability‑aware.

AI-written summary · about

  1. 0:00C API wrapping in modern C++
  2. 8:59Wrapper design goals for LMDB
  3. 13:18Error handling strategies
  4. 21:29Resource management with RAII
  5. 27:32Read-only vs read-write environments
  6. 34:35Type-safe serialization with traits
  7. 44:30Standard-compliant iterators
  8. 51:22Range-based iteration and views
  9. 54:28Runtime efficiency and testability
  10. 55:53Q&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.