Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

ISO C++ Jun 23 meeting trip report (core language)

October 9, 2023
Jason Merrill
Related topics:
Linux
Related products:
Red Hat Enterprise Linux

    ISO C++ June 2023 meeting "trip" report (core language)

    The C++ committee had its third hybrid meeting in Varna, Bulgaria this month, to begin work on C++26. This was the first time in this location, after the original plan to host the June 2020 meeting was cancelled. From Red Hat, Jonathan Wakely was there in person, while I attended virtually, from seven time zones behind. As usual, I spent most of my time in the Core working group.

    New C++26 features

    We moved a few new language features at the meeting:

    P2738, constexpr cast from void*

    Enabling type erasure patterns without virtual functions in constant evaluation, e.g.

        class Doer {
         private:
          const void *ob;
          int (*fn)(const void *);
         public:
          template <typename T>
          constexpr Doer(const T &t)
    	    : ob{&t},
    	      fn{[](const void *p) { return static_cast(p)->doit(); }}
          {}
          constexpr int operator()() const { return fn(ob); }
        };
        struct Thing { constexpr int doit() const { return 42; }; };
        static_assert (Doer(Thing())() == 42);
    

    I've already implemented this proposal for GCC 14; it was pretty trivial with the existing constexpr code.

    P2741, user-generated static_assert messages

    Allowing static_assert messages that aren't string literals, e.g.

        constexpr std::string_view str = "Hello";
        static_assert(false, str);
    
    P2169, placeholder variables with no name

    Removing the need to come up with distinct names for variables that only need names to satisfy syntax, e.g.

        int [a, _, b] = f();
        RAIIType _; // ok, another variable named _
        foo(_); // error, ambiguous
    
    P2641, checking if a union member is active

    This was a library motion, but requires compiler support. In constant evaluation, it's useful to be able to ask the compiler whether a particular union member is active. The paper proposes a more general mechanism, std::is_within_lifetime (ptr), which constant evaluation can answer based on knowing what value is currently stored in a particular object. For trivial types, this can already be tested in GCC with __builtin_constant_p (*ptr), but it's not straightforward to do this for a class type.

    P2752, static storage for braced initializers (DR)

    This isn't a new feature, but a clarification that it is OK for a compiler to put a constant initializer-list backing array into static storage even if it can't be sure that its lifetime doesn't overlap with the same one in a recursive call:

        void f(std::initializer_list<int>);
        void g() {
          f({1,2,3}); // the array of 3 ints can now go in .rodata regardless of the definition of f
        }
    

    This standardizes an optimization I already implemented for GCC 14.

    Potential C++26 features

    CWG also discussed various papers that weren't ready for a vote at this meeting, including:

    P1061, Structured Bindings can introduce a pack
        template <class F, class Tuple>
        constexpr decltype(auto) apply(F &&f, Tuple &&t)
        {
    	auto&& [...elems] = t; // elems is a structured binding pack
    	return std::invoke(std::forward<F>(f),
    	    forward_like<Tuple, decltype(elems)>(elems)...);
        }
    

    We saw this paper at the last meeting as well. At this meeting we were working to nail down the specific consequences of allowing this to be used outside of a template, as a use of the name of a structured binding pack in the pattern of a pack expansion is necessarily a dependent name. More work is needed on this.

    P2662, Pack indexing

    For getting at an element of a pack without writing another template.

        template<class ...T>
        int f( T...[0], std::tuple<T...> );
    
    P2795, Erroneous behaviour for uninitialized reads.

    The C++ committee is concerned about safety issues with buggy code in general, and working to limit the impact. This paper wants to address vulnerabilities from variables that are read without being first initialized (CWE-457). It proposes that reading such a variable no longer be undefined behavior, but rather a new category of "erroneous" behavior, which is well-defined but diagnosable: reading an erroneous value can still be rejected by something like valgrind, but it won't give you the value that happened to be at that location before. The GCC -ftrivial-auto-var-init flag implements something similar. Various people on the committee pointed out that sometimes leaving a variable actually uninitialized is important to performance, so there needs to be a way to opt out of the new semantics; discussion of that mechanism is ongoing.

    And then, of course, we spent a good amount of time resolving more subtle issues.

    The C++26 process is off to a strong start; the next meeting will be in November, back in Kona.

    Disclaimer: Please note the content in this blog post has not been thoroughly reviewed by the Red Hat Developer editorial team. Any opinions expressed in this post are the author's own and do not necessarily reflect the policies or positions of Red Hat.

    Related Posts

  • Report from the virtual ISO C++ meetings in 2020 (core language)

  • C++ standardization (core language) progress in 2021

  • ISO C++ Feb 2023 meeting trip report (core language)

  • Why glibc 2.34 removed libpthread

  • New C++ features in GCC 13

  • A leaner <iostream> in libstdc++ for GCC 13

  • Recent Posts

    • Protect data offloaded to GPU-accelerated environments with OpenShift sandboxed containers

    • Case study: Measuring energy efficiency on the x64 platform

    • How to prevent AI inference stack silent failures

    • Preventing GPU waste: A guide to JIT checkpointing with Kubeflow Trainer on OpenShift AI

    • How to manage TLS certificates used by OpenShift GitOps operator

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.