2. • Software Engineer at MPGC Services Ltd
• SG9 (Ranges) Chair
• Israeli National Body Chair
• ISO Foundation Board Member
• CoreC++ Conference & User Group Organizer
• C++Now (AKA boost-con) Program Chair
WHO I AM?
2
3. • Disclaimer: Slides on C++ future contains assumptions, my view & experience
• Meeting focus: around 60% on C++23 and 40% on C++26 topics
• Major topics related to the future of C++ where discussed
• Next version (to be signed in February) is C++23
• Terminology
• Evolution Work Group (EWG) – language utils
• Library Evolution Work Group (LEWG) – standard library utils
THE PROGRESS OF C++
3
4. C++23 LANGUAGE FEATURES
• P2589: Static operator [ ]
• Based on “P1169: static operator()”, was accepted into C++23 earlier this year
• Saves the need to create an object to achieve desired functionality
• Originally suggested at to LWG on 2014 by Gabi
• Motivated by “P2128: Multidimensional subscript operator”, “P0009: MDSPAN”
4
5. C++23 LANGUAGE FEATURES
• P2644: Final Fix of Broken Range-based for Loop (Nicolai Josuttis)
• Issue originates with temporaries on the right side of range-based for loop
5
6. C++23 LANGUAGE FEATURES
• P2644: Final Fix of Broken Range-based for Loop (Nicolai Josuttis)
• https://wandbox.org/permlink/ohuuTOyx5k8MWWyh
6
7. C++23 LANGUAGE FEATURES
• P2647: Permitting static constexpr variables in constexpr functions
(Barry Revzin, Jonathan Wakely)
• P2564: consteval needs to propagate up (Barry Revzin)
constexpr functions to implicitly be conseval when conditions are met
• P2552: On the ignorability of standard attributes (Timur Doumler)
Well defining the conditions on which attributes can be safely ignored
• P2615: Meaningful exports (S. Davis Herring)
Allow exporting asm and static_assert (as well as in extern declarations)
7
• And other fixes…
https://godbolt.org/z/vrxf64jj1
9. C++23 LIBRARY FEATURES
• P2674: A trait for implicit lifetime types (Timur Doumler, Vittorio Romeo)
• Adding: “is_implicit_lifetime” trait, as a utility for the accepted paper:
“P0593: Implicit creation of objects for low-level object manipulation” (C++20)
• objects of sufficiently trivial types be created on-demand as necessary within
newly-allocated storage
9
10. C++23 LIBRARY FEATURES
• P2505: Monadic Functions for std::expected (Jeff Garland)
• “P0323: std::expected” was voted into C++23
• std::optional allows:
• This paper adds the same abilities to std::expected
10
11. C++23 LIBRARY FEATURES
• Library Fundamentals TS v3 (Thomas Köppe) accepted into the standard
• Technical Specification
• Utilities which where add into <experimental> namespace
• Some were already added into C++17, C++20, Latest version add scope utils:
• scope_exit - invokes a function object on (every) scope exit
• scope_fail - invokes a function object in case of exception at end of scope
• scope_success - invokes a function object in case of success
• unique_resource - similar to unique_ptr, but doesn’t require NullablePointer
• P0493: Atomic maximum/minimum (Al Grant, Bronek Kozicki)
• (tentative) P2655: common_reference_t of reference_wrapper Should Be a Reference
Type (Hui Xie, S. Levent Yilmaz)
• And other fixes…
11
12. C++26 LANGUAGE FEATURES
• P2547: Language support for customizable functions (Lewis Baker, Corentin
Jabot, Gašper Ažman)
• P0609: Attributes for Structured Bindings (Aaron Ballman)
• P2558: Add @, $, and ` to the basic character set (Steve Downey)
• P2686: Wording & Implementation experience for P1481 (Corentin Jabot)
• P1481: constexpr structured bindings (Nicolas Lesser)
12
• P1967: Preprocessor embed (JeanHeyd Meneide)
• And other features…
13. C++26 LIBRARY FEATURES
• P1673R5: A free function linear algebra interface based on the BLAS(Mark
Hoemmen)
• P2630: Submdspan (Christian Trott, Damien Lebrun-Grandie, Mark
Hoemmen)
returns a view of partial part of mdspan
• P0792: function_ref: a type-erased callable reference
• Numerics
• Networking (with security being a major conflict topic)
• copyable_function
• And other features… 13
15. THE FUTURE OF C++ - SAFETY
• Evening session (organized by EWG chair)
• Major topics related to the future of C++ were discussed
• Safety and Security topics were in focus
• Both contracts feature and tooling improvements can support this target
15
16. THE FUTURE OF C++ - CONTRACTS
• P2695: A proposed plan for contracts in C++ (Timur Doumler, John Spicer)
• Approved for C++26
16
17. THE FUTURE OF C++ - TOOLING
• P2656: C++ Ecosystem International Standard (René Ferdinand Rivera Morell,
Ben Craig)
• Define a coherent API between IDEs, Compilers, Static Analysis, etc.
• (Possibly) A separate standard for tooling
17
18. THE FUTURE OF C++ - STD::EXECUTION
• P2300: std::execution (Michał Dominiak, Georgy Evtushenko, Lewis Baker, Lucian
Radu Teodorescu, Lee Howes, Kirk Shoop, Michael Garland, Eric Niebler, Bryce
Adelstein Lelbach)
18
19. THE FUTURE OF C++ - PATTERN MATCHING
• P1371: Pattern Matching (Bruno Cardoso Lopes, Sergei Murzin, Michael Park,
David Sankel , Dan Sarginson, Bjarne Stroustrup)
19
20. THE FUTURE OF C++ - REFLECTION
• P1240: Scalable Reflection in C++ (Wyatt Childers, Andrew Sutton, Faisal Vali,
Daveed Vandevoorde)
20
21. THE FUTURE OF C++ - OTHER PROJECTS
• Cpp2 (Cpp Front) - a “front end” layer by Herb Sutter (WG21 convenor)
• Circle - C++ compiler front end, extends C++ utilities by Sean Baxter
• Carbon - aiming to be C++ successor by reserving compatibility open source
• Rust - Compiled language with safe defaults, aiming for the same use case
21
22. Trip report by WGs and SGs chairs:
https://www.reddit.com/r/cpp/comments/yxuqp7/202211_kona_iso_c_committee_tr
ip_report_c23_first/
KONA 2023 TRIP REPORT
Inbal Levi
sinbal2lextra@gmail.com
twitter.com/inbal_l
linkdin/in/inballevi
THANK YOU!
Would love your
input!
22