Tag
Introduces rjk::duck, a C++26 reflection library that simplifies type erasure with a clean interface and minimal boilerplate, leveraging the new C++26 reflection features.
The C++26 standard introduces several improvements to the std::format library, including direct pointer formatting, path formatting, constexpr support, and a new empty line overload for std::println.
C++26 introduces two new function wrappers: std::copyable_function, which provides a copyable, const-correct alternative to std::function, and std::function_ref, a non-owning callable reference with reference semantics.
C++26 is introducing standardized library hardening to catch common undefined behavior (like out-of-bounds access) at runtime, based on Google's production experience showing a mere 0.30% performance overhead and a 30% reduction in segmentation faults.
The article benchmarks the compile-time cost of C++26 reflection for enum-to-string conversion against C++17 libraries and X-macro preprocessor techniques using GCC 16.