




Speaker and organizer of C++ conferences
A leader in C++ standardization committee


Israeli NB Chair, LEWG Chair

Hamakor

Nice to meet you!
I'm Inbal Levi



Windows & Azure Security Group
Develop AI tools for C++ Engineers
Nice to meet you!
I'm Inbal Levi
* Info is from my point of view
Safety
Simplicity
Performance
Reducing UB
Hardening
the library &
the language
Reduce boilerplate
Language is more expressive & accessible
Keep Zero-overhead
More compile-time
C++26
This talk: https://slides.com/d/3xvcfGk/live

Implementation
Standard
auto a = 42 ;
Syntax
auto a = 42 ;
Semantics
0b101010
auto a = 42 + "\0" ;
auto a = 42 + '\0' ;
auto a = "42" ;
a
int
Language Design
Compiler
❌ Checks
▶️ Run
Snippets
📚
Libraries
🐞Debug, Logs & Error Utils
⚠️ Warnings
📖 Documentation
0b101010
a
int
0b101010
a
const char *
0b0
a
const char *
This talk: https://slides.com/d/3xvcfGk/live

Static Reflection
Reflection: Your access to the compiler
int main() {
constexpr auto r = ^^int;
typename[:r:] x = 42;
}int main() {
auto r = ^^int;
typename[:r:] x = 42;
}int main() {
constexpr auto r = ^^int;
constexpr typename[:r:] x = 42;
}Inspect your program
at compile time

From: Welcome to v1.0 of the meta::[[verse]]!
(CppNow2024, CoreC++2024, CppUnderSea2024, ACCU2024, CppCon2025, CppOnSea2025)
Reflection: Your access to the compiler
#include <experimental/meta>
struct S;
consteval {
define_aggregate(^^S, {
data_member_spec(^^int, {.name = "i"}),
data_member_spec(^^char, {.name = "c"})
});
}
int main() {
constexpr S s1{4, '2'};
static_assert(s1.i == 4 && s1.c == '2');
S s2;
}* Code Generation
https://godbolt.org/z/WoTszsYhf

* some
define_aggregate
Reflection: Your access to the compiler
#include <string>
#include <type_traits>
// Define type list
template<typename... Ts>
struct type_list {};
// Define concat
template<typename... Lists>
struct concat;
template<typename... Ts, typename... Us, typename... Rest>
struct concat<type_list<Ts...>, type_list<Us...>, Rest...>
: concat<type_list<Ts..., Us...>, Rest...> {};
template<typename T>
struct concat<T> {
using type = T;
};
template<typename... Lists>
using concat_t = typename concat<Lists...>::type;
// Define filter (could be nicer using P2841)
template<typename L, template<typename> typename Pred>
struct filter;
template<typename... Ts, template<typename> typename Pred>
struct filter<type_list<Ts...>, Pred> {
using type = concat_t<
std::conditional_t<
Pred<Ts>::value,
type_list<Ts>,
type_list<>
>...
>;
};
// Define filter_t
template<typename L, template<typename> typename Pred>
using filter_t = typename filter<L, Pred>::type;
// --- Usage ---
// Define a predicate
template<typename T>
struct is_trivial : std::is_trivially_copyable<T>
{};
using my_types = type_list<int, std::string, double>;
using my_filtered_types = filter_t<my_types, is_trivial>;
static_assert(std::is_same_v<my_filtered_types, type_list<int, double>>);Cleaner meta-programming
type_list<int, double>
* P2841: (concept & variable-template template-params) (C++26)
Corentin Jabot, Gašper Ažman, James Touton, Hubert Tong
#include <meta>
using namespace std::meta;
consteval auto filter(std::vector<info> types, auto pred) {
std::erase_if(types, [&](info t){ return !pred(t); });
return substitute(^^std::tuple, types);
}
constexpr auto is_trivial = [](info t){ return is_trivially_copyable_type(t); };
constexpr auto my_types = std::initializer_list<info>{^^int, ^^std::string, ^^double};
using my_filtered_types = [:filter(my_types, is_trivial):];
static_assert(std::is_same_v<my_filtered_types, std::tuple<int, double>>);type_list<int, std::string, double>
https://godbolt.org/z/vP9ze6eo9

Reflection: Your access to the compiler
int main() {
constexpr auto r = ^^int;
typename[:r:] x = 42;
}- P2996: Barry Revzin, Wyatt Childers, Peter Dimov, Andrew Sutton, Daveed Vandevoorde,
Faisal Vali, Dan Katz - Reflection SG (SG7) Chair: Hana Dusíková
- Implementors: Dan Katz, Wyatt Childers, Daveed Vandevoorde, ...
- Also: Mike Spertus, Matúš Chochlik, David Sankel, Herb Sutter, Jagrut Dave, Adam Lach,
Andrei Alexandrescu, and many many others...
👋
👋
👋
Compiler
❌ Checks
📚
Libraries
📖 Documentation
▶️ Run
Snippets
https://godbolt.org/z/vP9ze6eo9


Welcome to v1.0 of the meta::[[verse]]!
constexpr exceptions
#include <stdexcept>
consteval void should_not_be_called() {
throw std::logic_error("should not be called!");
}
constexpr int is_issues() {
try {
should_not_be_called();
} catch (...) {
return 1;
}
return 0;
}👋
👋
🐞Debug, Logs & Error Utils
static_assert(is_issues() == 0);https://compiler-explorer.com/z/6P7aMo7vT

https://compiler-explorer.com/z/h1Tff5d3P
constexpr all the things
- P3295: (Freestanding constexpr containers and constexpr exception types) Ben Craig
- P3372: (constexpr ALL the containers) Hana Dusíková
- Implementors: Hana Dusíková
- Honorable mention: (2017: P0810, CppCon Talk) Jason Turner, Ben Dean
👋
👋
Compiler
❌ Checks
📚
Libraries

Contracts: Keep your promises
Specify program's invariants
int div_N_set(const int a, const int b)
pre ((b > 0) && (a > 0) && (a % b == 0))
post (r: r * b == a)
{
contract_assert(a >= b);
return a / b;
}- Preconditions
True before a call - Postconditions
Guaranteed after a call - Assertions
Verify logic in a function

int r = div_N_set(5,6);int div_N_set(const int a, const int b)
pre ((b > 0) && (a > 0) && (a % b == 0))
{
return a / b;
}int div_N_set(const int a, const int b)
pre ((b > 0) && (a > 0) && (a % b == 0))
post (r: r * b == a)
{
return a / b;
}int div_N_set(const int a, const int b)
{
return a / b;
}https://godbolt.org/z/Ts9KEohzb

Contracts: Keep your promises
Build Modes
int div_N_set(const int a, const int b)
pre (...)
post (...)
{
}
int main() {
auto r = div_N_set(4,5);
}- Ignore
No check - Enforce
Check, log, terminate - Observe
Check, log, continue - Quick-Enforce
Check, terminate
int div_N_set(const int a, const int b)
pre (...)
post (...)
{
std::vector<int> v = {};
v.front();
}
int main() {
auto r = div_N_set(4,5);
}

Contracts: Keep your promises
- Define handle_contract_violation
- Link (your program will adopt it's behaviour)
Customize behaviour
void handle_contract_violation(const std::contracts::contract_violation&){
...
}https://godbolt.org/z/W68rj6ndj


https://contracts.efcs.ca/
Contracts: Keep your promises
int div_N_set(const int a, const int b)
pre ((b > 0) && (a > 0) && (a % b == 0))
post (r: r * b == a)
{
contract_assert(a >= b);
return a / b;
}- P2900: Joshua B, Timur Doumler, Andrzej K, Gašper A, Peter B, Louis D, Tom H, Lori H, John Lakos, Lisa L, Jens M, Ryan M, Jason M, Oliver J. R, Iain S, Ville V
- Contracts SG (SG21) Chair: Timur Doumler
- Implementors: Eric Fiselier (WF), Corentin Jabot, Nina Ranns, Iain Sandoe
- And many many many others...
👋
👋
- But what other types of functions are out there...?
https://godbolt.org/z/W68rj6ndj

▶️ Run
Snippets
🐞Debug, Logs & Error Utils
⚠️ Warnings
📖 Documentation
std::execution: Strong async framework
#include <print>
#include <execution>
namespace ex = std::execution;
int main()
{
// Get a scheduler
auto sched = ex::get_parallel_scheduler();
// Build a sender chain
auto PowerTwo = [](int i) { return i*i; };
auto TimesTwo = [](int i) { return i*2; };
sender auto work = ex::when_all(ex::on(sched, ex::just(2)|ex::then(PowerTwo)),
ex::on(sched, ex::just(1)|ex::then(TimesTwo)));
// Compose & launch the work
auto [x,y] = ex::sync_wait(std::move(work)).value(); // Wait till all finish
print("%d %d", x, y); // 4 2
}- Composable
- Strongly typed, lazily evaluated (similar to views)
https://godbolt.org/z/96hcW5KT7

std::execution: Strong async framework
- sender (work) is connected to the receiver (callback) by caling "connect".
- The call creates an operation-state
- Calling "start" on the operation-state will launch the work on a scheduler
https://godbolt.org/z/96hcW5KT7

#include <print>
#include <execution>
namespace ex = std::execution;
int main()
{
// Get a scheduler
auto sched = ex::get_parallel_scheduler();
// Build a sender chain
auto PowerTwo = [](int i) { return i*i; };
auto TimesTwo = [](int i) { return i*2; };
sender auto work = ex::when_all(ex::on(sched, ex::just(2)|ex::then(PowerTwo)),
ex::on(sched, ex::just(1)|ex::then(TimesTwo)));
// Compose & launch the work
auto [x,y] = ex::sync_wait(std::move(work)).value(); // Wait till all finish
print("%d %d", x, y); // 4 2
}std::execution: Strong async framework
- Seperation of concerns & responsibilities
- Minimize allocations & unrequired synchronization (library authors)
- Effective use of underline hardware (hardware vendors)
#include <print>
#include <execution>
namespace ex = std::execution;
int main()
{
// Get a scheduler
auto sched = ex::get_parallel_scheduler();
// Build a sender chain
auto PowerTwo = [](int i) { return i*i; };
auto TimesTwo = [](int i) { return i*2; };
sender auto work = ex::when_all(ex::on(sched, ex::just(2)|ex::then(PowerTwo)),
ex::on(sched, ex::just(1)|ex::then(TimesTwo)));
// Compose & launch the work
auto [x,y] = ex::sync_wait(std::move(work)).value(); // Wait till all finish
print("%d %d", x, y); // 4 2
}https://godbolt.org/z/96hcW5KT7

std::execution: Strong async framework
struct my_receiver {
using receiver_concept = std::execution::receiver_t;
void set_value(auto&&... values) && noexcept {
// Logic when work completes successfully
}
void set_error(auto&& error) && noexcept {
// Logic when work fails
}
void set_stopped() && noexcept {
// Logic when work is cancelled (clean up, return 503, log, etc.)
}
};User Customize: receiver, sender, schedule (in scheduler) "connect" (in sender) "start" (in operation state), "get_env" (in sender/receiver, including allocators)
https://godbolt.org/z/96hcW5KT7


std::execution: Strong async framework
- P2300: Eric Niebler, Michał Dominiak, Georgy Evtushenko, Lewis Baker, Lucian Radu Teodorescu, Lee Howes, Kirk Shoop, Michael Garland, Bryce Adelstein Lelbach
- Implementors: Eric Niebler, Lewis Baker, Dietmar Kühl , Ruslan Arutyunyan, Robert Leahy,
Lucian Radu Teodorescu - Also: Anthony Williams , Detlef Vollmann, and many many others...
- More info: talks (even here!), cppreference.com/cpp/execution, LEWG/wiki/Senders-Receivers
👋
👋
👋
👋
int main()
{
// Get scheduler
auto sched = get_parallel_scheduler();
// Build a sender chain
sender auto work = ex::when_all( ex::on( sched, ex::just(2) | ex::then([](int i) { return i*i; } )),
ex::on( sched, ex::just(1) | ex::then([](int i) { return i*2; } )));
// Launch
auto [x,y] = sync_wait(std::move(work)).value(); // Wait till all finish
print("%d %d", x, y); // 4 2
}Compiler
❌ Checks
▶️ Run
Snippets
📚
Libraries
🐞Debug, Logs & Error Utils
⚠️ Warnings
📖 Documentation
https://godbolt.org/z/96hcW5KT7

std::simd
- Type-safe, constexpr, Porable (optimized per-platform width, or fixed size)
- Algorithms support (reduction, addition, math, masking, generator, etc.)
#include <immintrin.h> // SSE intrinsics, run on x86-64
int main()
{
__m128 a = _mm_set_ps(4.0f, 3.0f, 2.0f, 1.0f);
__m128 b = _mm_set_ps(8.0f, 7.0f, 6.0f, 5.0f);
__m128 c = _mm_add_ps(a, b); // [6.0f, 8.0f, 10.0f, 12.0f]
}https://godbolt.org/z/Tfo87fW4K

#include <immintrin.h> // SSE intrinsics, run on x86-64
int main()
{
__m128 a = _mm_set_ps(4.0f, 3.0f, 2.0f, 1.0f);
__m128 b = _mm_set_ps(8.0f, 7.0f, 6.0f, 5.0f);
auto c = a + b; // [6.0f, 8.0f, 10.0f, 12.0f]
}int main() // x86-64
{
stdx::simd<float> a([](int i) { return float(i + 1); }); // [1,2, 3, 4]
stdx::simd<float> b([](int i) { return float(i + 5); }); // [5,6, 7, 8]
auto c = a + b; // [6,8,10,12]
}int main() // x86-64
{
stdx::simd<char> a([](char i) { return char(i + 1); }); // [1, 2, ..., 16]
stdx::simd<char> b([](char i) { return char(i + 5); }); // [5, 6, ..., 20]
auto c = a + b; // [6, 8, ..., 36]
}int main() // x86-64
{
stdx::simd<char> a([](char i) { return char(i + 1); });
stdx::simd<char> b([](char i) { return char(i + 5); });
auto c = a + b;
}int main() // x86-64
{
stdx::simd<float> a([](int i) { return float(i + 1); });
stdx::simd<float> b([](int i) { return float(i + 5); });
auto c = a + b;
}- P1928: (merge from TS) Matthias Kretz
- Many other papers: Daniel Towner, Matthias Kretz, Ruslan Arutyunyan, Olaf Krzikalla
- Implementors: Matthias Kretz, Daniel Towner, Ruslan Arutyunyan, ...
- And many, many others...
- More Info: cppreference.com/cpp/numeric/simd, github.com/GSI-HPC/simd, github.com/mattkretz/vir-simd
- Honerable mention: Eran Gilad ("Serial C++ can be parallel too")
Compiler
❌ Checks
▶️ Run
Snippets
📚
Libraries
📖 Documentation
https://godbolt.org/z/Tfo87fW4K

std::simd
int main() // x86-64
{
stdx::simd<float> a([](int i) { return float(i + 1); }); // [1,2, 3, 4]
stdx::simd<float> b([](int i) { return float(i + 5); }); // [5,6, 7, 8]
auto c = a + b; // [6,8,10,12]
}👋
std::linalg: Process Your Matrixed data
int main()
{
std::vector matrix = {1, 2, 3,
4, 5, 6};
std::vector vector = {1, 2, 3};
std::vector result = {0, 0};
auto mat_sp = stdex::mdspan(matrix.data(), 2, 3);
auto vec_sp = stdex::mdspan(vector.data(), 3);
auto res_sp = stdex::mdspan{result.data(), 2);
// Update data using the mdspan view
for(size_t i=0; i != mat_sp.extent(0); i++)
for(size_t j=0; j != mat_sp.extent(1); j++)
res_sp[i] += mat_sp[i, j]*vec_sp[j];
}|1 2| |1| |0|
|3 4| |2| |0|
|5 6| |3||14|
|32|
int main()
{
std::vector matrix = {1, 2, 3,
4, 5, 6};
std::vector vector = {1, 2, 3};
std::vector result = {0, 0};
auto mat_sp = stdex::mdspan(matrix.data(), 2, 3);
auto vec_sp = stdex::mdspan(vector.data(), 3);
auto res_sp = stdex::mdspan{result.data(), 2);
std::linalg::matrix_vector_product(mat, vec, res);
}(mdspan only) https://godbolt.org/z/qdGr4szoh

- P1673: Mark Hoemmen, Daisy Hollman, Christian Trott, Daniel Sunderland, Nevin Liber, Alicia Klinvex
Li-Ta Lo, Damien Lebrun-Grandie, Graham Lopez, Peter Caday, Sarah Knepper, Piotr Luszczek, Timothy Costa - Implementors: Mark , Alicia Klinvex, and others
- And many, many others...
- More Info: cppreference.com/cpp/numeric/simd, github.com/kokkos/stdBLAS
Compiler
❌ Checks
📚
Libraries
📖 Documentation
std::linalg: Process Your Matrixed data
👋
int main()
{
std::vector matrix = {1, 2, 3,
4, 5, 6};
std::vector vector = {1, 2, 3};
std::vector result = {0, 0};
auto mat_sp = stdex::mdspan(matrix.data(), 2, 3);
auto vec_sp = stdex::mdspan(vector.data(), 3);
auto res_sp = stdex::mdspan{result.data(), 2);
std::linalg::matrix_vector_product(mat, vec, res);
}Hardening, Debugging & Erroneous Behavior
P3471: (Standard library hardening) Konstantin Varlamov, Louis Dionne
constexpr reference operator[](size_type idx) const;Hardened Ppreconditions: idx < size() is true.
bool is_debugger_present() noexcept;
void breakpoint_if_debugging() noexcept;void printValue(int val) { // 2
std::cout << val << std::endl; // 3
}
int main() {
int x; // Uninitialized
printValue(x); // 1
}preconditions: idx < size() is true.
Reflection & Metaprogramming
- Static Reflection
- Expansion statements
Syntax
- Placeholder variables _
- Pack indexing
- = delete("reason")
- Variadic friends
- #embed
- Oxford variadic comma
Safety & UB Removal
- Erroneous behavior
- EB for uninitialized reads + [[indeterminate]]
- Disallow returning reference to temporary
- Delete pointer to incomplete type is ill-formed
- Trivial infinite loops are not UB
- Observable checkpoints (+ lib)
Language Features
Other extensions & fixes
- Trivial unions
- Unevaluated strings
- @, $, ` in basic character set
- User-generated static_assert messages
- Static storage for braced initializers
- Template parameter initialization
- Fold expression constraint ordering
- Brace elision clarification
- Diagnosing preprocessor errors
- Module declaration cleanup (3 papers)
- concepts and variadic template template parameters
- Attributes for structured bindings, as condition, intoduce a pack
Contracts
Constexpr
- Constexpr cast from void*, placement new, structured binding
- Constexpr virtual inheritance
- Constexpr exceptions (+ lib)
https://cppreference.com/cpp/26
Library Features
Major New Libraries
- std::execution (senders/receivers)
- std::simd (SIMD)
- std::meta (reflection metafunctions)
- std::linalg (linear algebra)
- std::inplace_vector
- std::hive
- std::polymorphic & std::indirect
- Hazard pointers
- RCU (Read-Copy-Update)
- std::text_encoding
- Contracts (lib support)
Utilities & additions
- approximatly_sized_range & ranges::reserve_hint
- parallel range algorithms
- std::debugging
- std::submdspan
- std::type_order (lib extension supporting standard type ordering)
- std::is_within_lifetime
- Saturation arithmetic
- Standard library hardening
Algorithms & Constexpr
- constexpr all the containers
- constexpr std::exceptions
- Constexpr stable sorting
- More constexpr <cmath> and <complex>
- ADL-proof std::projected
- <charconv> success/failure testing
Additional Ranges
- std::views::concat
- std::views::chache_latest
- std::views::indices
- std::ranges::as_input_view
- std::ranges::generate_random
Fixes & extensions
- std::optional<T&>
- std::weak_ptr as unordered key
- Heterogeneous associative container overloads
- Native file stream handles
- Hashing for std::chrono types
- New SI ratio prefixes
- std::to_string uses std::format
- Formatting pointers
- Type-checking format args
- basic_format_arg::visit()
- std::variant::visit() member
- interfacing stringstream and string_view
- interfacing bitset and string_view
https://cppreference.com/cpp/26
Profiles & Bounds Checking
Subsets of the language that enforce safety rules
Safety & Security (a taste from C++29*)
* Disclaimer - non of the above is final yet
High Quality Libraries for Common Tasks
Networking, Units and Quantities, cstring_view
Stronger Types & Language
floating points, BitInt<N>, Pattern matching?
Language that allows humans to communicate instructions to a computer
and to other humans
and to AI :)
Syntax
auto a = 42 ;
Semantics
0b101010
a
int
Implementation
Standard
Language Design
Compiler
❌ Errors
▶️ Run
Snippets
📚
Libraries
🐞Debug, Logs & Error Utils
⚠️ Warnings
📖 Documentation
Final ratification expected in late 2026
The future of C++ is safe, simple, and powerful
Takeaways
Takeaways
Become a contributor!
Hana Dusíková, Dan Katz, Hui Xie, Dietmar Kühl, Robert Leahy, Lucian Radu Teodorescu
Start experimenting TODAY!







You can help implementations land earlier!
C++26 Uncovered
Everything You Need to Know About the New Standard


Thank you for listening! 🤗
Inbal Levi
linkedin/inballevi







C++26
By Inbal Levi
C++26
- 52