Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Red Hat at the ISO C++ Standards Meeting (April 2017, Kona): Core Language

June 27, 2017
Jason Merrill
Related topics:
Developer Tools
Related products:
Red Hat OpenShift

Share:

    The March/April C++ meeting was back in Kona, Hawaii again, only a year and a half after the last Kona meeting. As usual, Red Hat sent three of us to the meeting: Jonathan Wakely, Torvald Riegel, and me.

    The headline from the meeting was voting to submit C++17 for approval by the national bodies. There wasn't really any significant resistance.

    There was one new feature added in the final draft, namely std::byte, which was expected to go in at the meeting in Issaquah, WA, last November but got derailed by naming concerns. std::byte is intended to be used instead of a variant of char for typeless memory access; hopefully, in the future, we can remove the broad aliasing semantics from char and thereby improve optimization of types with char members.

    As usual, I spent the week in the Core language working group.

    Core spent much of the week discussing C++ Modules and argument-dependent lookup. In C++ without Modules, there's only one instance of each namespace, so it's clear what is found by argument-dependent lookup. But this gets more complicated with modules, where a template defined in module A might depend on non-exported declarations, and argument-dependent lookup might need to find declarations in another module or the importing translation unit. For more information on these discussions, see this paper.

    The expectation was that after these adjustments, the Modules working paper would advance to the initial ballot as a Technical Specification. But at the full committee plenary at the end of the week it was pointed out that some design choices made at the Jacksonville meeting the previous year were still not reflected in the document; as a result, we decided not to proceed to TS at this point.

    Some people are eager to have published a TS in order to increase the number of implementations, but I'm skeptical that it would actually make a difference; the Concepts TS has not led to any more implementations, and it did not help Concepts make C++17. It may even have hindered the progression of Concepts, as we spent a lot less time looking at Concepts issues after the publication of the TS, and even explicitly delayed considering significant design concerns to wait for feedback from users and implementors, which feedback was later deemed to have been inadequate. In particular, our experience with the Concepts TS being published with known design issues should discourage us from doing the same with Modules.

    For Modules, I don't think that a delayed TS will be a problem at all.  Users are clamoring for the feature, and work is proceeding swiftly toward a GCC implementation in addition to the existing (and rather different) VC++ and Clang implementations. If Modules stays as a working paper until it is incorporated into C++20 that seems fine to me.

    Core also spent a fair amount of time resolving issues with C++17 class template argument deduction and deduction guides, which were a source of concern for many people going into the meeting. I led this off by drafting and implementing proposed resolutions to issues that had come up on the reflector and worked through the week with Michael Spertus on the Library side to make sure that the feature as specified had semantics that would work well for Library templates.

    We also discussed a concern raised by Library with the restrictions on using a pointer to an old object that has been replaced. After the C++98 standard, core issue 89 pointed out that there was no restriction on replacing a static or automatic object containing a reference member like there was for const objects. In response, the committee added a restriction on pointers to objects containing const or reference members: if such an object is replaced, a pointer to the old object cannot be used to refer to the new object.

    Optimizers have never taken advantage of this restriction, but late in the C++14 process people noticed that this rule causes problems with several library classes; it was discovered when thinking about std::optional, but clearly affects std::vector as well. Given a vector of class C which contains a reference member, if we pop an element and then push a new object in its place, can we use vector's internal data pointer to refer to the new object? This is core issue 1776.

    The solution adopted for issue 1776 was to provide a library function std::launder which could be used to tell the compiler to forget what it thinks it knows about what a pointer refers to. So std::vector can launder its internal pointer and then use it to refer to the new object.

    There continue to be concerns that this isn't good enough, but Core is not yet convinced. There will be an evening session for discussing this issue at the next meeting.  One compromise might be to weaken the restriction (and therefore the potential optimization) specifically for pointers while retaining it for references and named variables; issue 89 was originally about named variables and the restriction in paragraph 10. Independently, it might make sense for launder/placement new to implicitly launder all pointers based (in the sense of C restrict semantics) on a common ancestor; it doesn't make much sense to need to use the return value.

    The next meeting will be in Toronto, ON, Canada in July 2017.


    Whether you are new to Containers or have experience, downloading this cheat sheet can assist you when encountering tasks you haven’t done lately.

    Last updated: March 23, 2023

    Recent Posts

    • Create and enrich ServiceNow ITSM tickets with Ansible Automation Platform

    • Expand Model-as-a-Service for secure enterprise AI

    • OpenShift LACP bonding performance expectations

    • Build container images in CI/CD with Tekton and Buildpacks

    • How to deploy OpenShift AI & Service Mesh 3 on one cluster

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue