New Features in C++26
The ISO released new C++ standards on a three-year cycle, with C++26 proposals open until January 2025. Updates include hazard pointers, user-space RCU support, debugging headers, and template enhancements for improved functionality.
Read original articleThe ISO has released new C++ language standards on a three-year cycle, with C++26 proposals open until January 2025. Notable additions include hazard pointers for lock-free concurrent code and user-space RCU support. These features are already available for experimentation in GCC and Clang. The proposed hazard-pointer library involves retiring shared objects atomically to manage object reclamation. User-space RCU, widely used in the Linux kernel, allows safe object updates through pointer swapping. C++26 also introduces smaller changes like a debugging header, linear algebra features, and text encoding enhancements. Core language changes include defining infinite loops as defined behavior and allowing void* casting in constexpr. Template improvements involve indexing packs and using them in friend declarations. These changes aim to enhance C++'s functionality and maintainability. The upcoming C++26 standardization meetings are expected to approve these changes, offering a window for feedback and additional suggestions.
i would actually wager that rcu in and of itself is almost at par with atomics and the memory-model :o)
for folks wondering about 'hazard-pointers' this paper https://web.archive.org/web/20171104135736/http://www.resear... is quite useful as an excellent starting point.