By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: C++26 Draft Finalized with Static Reflection, Contracts, and Sender/Receiver Types
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > C++26 Draft Finalized with Static Reflection, Contracts, and Sender/Receiver Types
News

C++26 Draft Finalized with Static Reflection, Contracts, and Sender/Receiver Types

News Room
Last updated: 2025/06/27 at 2:09 PM
News Room Published 27 June 2025
Share
SHARE

The next major release of C++ reached an important milestone earlier this month, when the ISO C++ committee froze the feature set that will go into C++26. Notable additions include compile-time reflection, contracts, asynchronous execution, and many others.

Static reflection enables compile-time introspection on types and behavior, aiming to extend C++ metaprogramming capabilities. At a basic level, reflection allows to write code similar to the following to convert an enum to a string:


enum Color { red, green, blue };
static_assert(enum_to_string(Color::red) == "red");

While the user-facing syntax for using reflection is simple, in keeping with modern C++ philosophy, the implementation of the feature shown above is significantly more complex. Still it offers a glimpse of the capabilities reflection will unlock:


template <typename E>
    requires std::is_enum_v<E>
constexpr std::string enum_to_string(E value) {
    template for (constexpr auto e : std::meta::members_of(^E)) {
        if (value == [:e:]) {
            return std::string(std::meta::name_of(e));
        }
    }
    return "<unnamed>";
}

Reflection will debut in C++ in an early form and is expected to evolve in future versions. Even so, it will already be powerful enough to enable advanced use cases, such as generating bindings for other languages like JavaScript and Python. This is how Herb Sutter describes the feature in its latest Trip Report:

Even with the first partial reflection capability we have today, we will already be able to reflect on C++ types and use that information plus plain old std::cout to generate arbitrary additional C++ source code that is based on that information and that we can compile and link into the same program as it’s being built.

In the future, using reflection it will be possible to generate C++ code within the same source file using token injection.

Other features accepted into the standard at the latest ISO C++ committee meeting include parallel algorithms for the Ranges library, async scopes, aimed at enabling RAII (resource allocation is initialization) style programming for resource management in asynchronous contexts, and a parallel scheduler providing an advanced execution context for thread pools.

Several major features accepted in previous committee meetings include contracts, asynchronous execution, and numerous others not covered here, such as enhancements to template metaprogramming with pack indexing, the #embed directive for including binary resources, bounds-checked iterators and null pointer validation, SIMD parallelism, and more.

Contracts aim to support design by contract through [[pre:]], [[post:]], and contract_assert. Originally planned for C++20, they were ultimately removed from the final draft, but are now making their way into the standard.

std::execution provides mechanisms to manage asynchronous execution on generic execution resources. Its core concepts are sender and receiver: a sender represents a unit of asynchronous work that sends its result to a receiver. The framework is completed by the concepts of state associated with an asynchronous operation and a light-weight scheduler.

Work on C++26 continues, but as Sutter highlights, it is closer to completion than many might expect, with GCC and Clang already supporting about two-thirds of the adopted language features. InfoQ will keep reporting on the evolution of the next C++ standard as it progresses.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article MCP Tools: The AI Agent Stack for the Model Context Protocol
Next Article Social Media Marketing Tools: Ultimate 2025 Beginner’s Guide
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

The ‘Kadrey v. Meta’ fair use ruling is just the start of a long, complex AI copyright battle
News
Vibe Coding Explained: Tools, Tips & Setup Inspiration |
Computing
Google Photos just got an update that changes how HDR photos are edited
News
The 3 can’t-miss Netflix releases that belong on your watchlist next week
News

You Might also Like

News

The ‘Kadrey v. Meta’ fair use ruling is just the start of a long, complex AI copyright battle

13 Min Read
News

Google Photos just got an update that changes how HDR photos are edited

3 Min Read
News

The 3 can’t-miss Netflix releases that belong on your watchlist next week

5 Min Read
News

I tested a bunch of gaming laptops and these are the best

22 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?