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

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

May 7, 2021
Jason Merrill
Related topics:
C, C#, C++LinuxOpen source
Related products:
Developer Toolset

    C++ standardization was dramatically different in 2020 from earlier years. The business of the International Organization for Standardization (ISO) committee all took place virtually, much like everything else during this pandemic. This article summarizes the C++ standardization proposals before the Core and Evolution Working Groups last year.

    Core language

    The C++ Core Working Group (CWG) had already been holding monthly Zoom teleconferences between meetings; this was how I encountered Zoom in the before times. So the transition for us was fairly smooth.

    We did end up moving a few papers at a virtual full committee plenary on one of the days of the canceled November meeting.

    Literal suffix for (signed) size_t

    This paper (P0330) was ready after the Belfast meeting in November 2019, but because it was intended as a C++23 feature, we didn't want to bring it up for a vote until after we finished C++20. This proposal makes it easier to write a constant of size_t or ptrdiff_t type. This practice is useful, for instance, to match the return type of a size() function:

    auto m = std::max (0, v.size()); // error, deduction mismatch int vs. size_t
    auto m = std::max (0uz, v.size()); // OK, both arguments are size_t

    Earlier versions of this proposal used t for ptrdiff_t and z for size_t, like the printf conversion specifiers, but the final version uses uz for size_t and z for the corresponding signed type (usually the same as ptrdiff_t).

    Numeric and universal character escapes in character and string literals

    This paper (P2029) clarifies the handling of hex and octal character escapes to standardize the GNU Compiler Collection (GCC) behavior rather than the (Microsoft Visual C++) MSVC behavior: Namely, that a single escape code can correspond to a single UTF-8 code unit, not necessarily an entire character.

    constexpr const char8_t c[] = u8"\xc3\x80"; // UTF-8 encoding of U+00C0 {LATIN CAPITAL LETTER A WITH GRAVE}

    Declarations and where to find them

    During the week of the planned June meeting, CWG decided to meet for the full week, two hours a day, to continue reviewing a paper (P1787) we had started to look at in Prague: An ambitious proposal to overhaul the wording for declaration scope and name lookup completely, and thereby fix more than 60 open issues. One week stretched into three before we got through the whole paper.

    This paper's changes should not affect a significant amount of code; many changes are clarifications that bring the wording in line with existing practice. Some are clarifications of corner cases that most code doesn't depend on, such as ambiguous lookup within a conversion-type-id.

    A few changes allow code that was previously ill-formed:

    • conversion-type-id is added to the list of type-only contexts from P0634:
      template <class T> struct A { operator T::type(); }; // OK
    • ::template is also not required in type-only contexts:
      template <class T> auto f(T t) { return static_cast<T::X<int>>(t); } // OK
    • Default template arguments are now complete-class contexts, like default function arguments:
      template <class T> struct A {
        template <int I = sizeof(t)> void g() { } // OK
        T t;
      };

    One change might break a small amount of existing code: Because the lookup for a name after a dot (.) or arrow operator (->) now happens first in the scope of the object, .template is required in dependent.template X<...> even if a definition of X would be found by  an unqualified lookup:

    template <int> struct X { void f(); };
    template <class T> void g(T t) { t.X<2>::f(); } // error, needs .template

    Generalized wording for partial specializations

    This paper (P2096) just cleaned up places in the standard that still referred to partial specializations only for classes, so that these places cover variable partial specializations, as well.

    Down with ()!

    This paper (P1102) has completed its Core review and should be ready for a vote at the next virtual plenary. The paper proposes a change to lambda syntax to avoid requiring () in a mutable lambda:

    [x = 42] () mutable { ++x; }; // () are uselessly required in C++20

    Language evolution

    The C++ Evolution Working Group (EWG) has been meeting regularly to discuss future directions, but as a matter of policy, has not been voting to forward papers to the CWG until a face-to-face meeting takes place.  Recently, they decided on electronic voting, and the following papers were up for EWG voting through February.

    Narrowing contextual conversions to bool

    CWG2039 changed the condition of a static_assert to reject narrowing conversions to bool, for instance, from integers larger than 1. This seems to have been unintended, and most compilers haven't implemented it yet. So this paper (P1401) changes the feature back and makes the same change to the condition of if constexpr:

    static_assert (2, "two"); // OK again

    Make declaration order layout mandated

    This paper (P1847) argues that because no compiler actually reorders data members with different access, we should drop that permission.

    if consteval

    This proposed mechanism (P1938) is much like if (std::is_constant_evaluated()), except that the first block of the if is an immediate function context, allowing calls to consteval functions with arguments that depend on the parameters of the current (constexpr) function.

    C++ identifier syntax using Unicode standard annex 31

    C++ has periodically needed to change its list of Unicode characters that are allowed in identifiers; this paper (P1949) proposes adopting the set specified by the actual Unicode standard, which has stabilized since C++11.

    Freestanding optional operator new

    This paper (P2013) proposes that a freestanding implementation need not provide a definition of the replaceable new operator.

    Allow duplicate attributes

    C++11 attributes disallowed the repetition of the same attribute within a single attribute list, like [[nodiscard, nodiscard]]. C recently removed this restriction, and this paper (P2156) proposes to do the same for C++.

    Attributes on lambda-expressions

    This paper (P2173) proposes allowing attributes to appear in a lambda after the lambda-introducer, such as:

    [] [[nodiscard]] (int x) { return x; }

    Removing garbage collection support

    This paper (P2186) points out that there are no implementations of the C++11 "minimal support for garbage collection," and that several C++ implementations of actual garbage collection don't interact with the C++11 feature, and so proposes removing it.

    Mixed string literal concatenation

    This paper (P2201) proposes changing the concatenation of string literals with different encoding prefixes from conditionally supported to ill-formed.

    Trimming whitespaces before line splicing

    This paper (P2223) proposes ignoring any whitespace after a backslash (\) at the end of a line, except in a raw string.

    Conclusion

    The various working groups continued to meet virtually through the beginning of the year, and had another virtual plenary the week of the originally planned February meeting.  Currently the tentative plan is to continue meeting virtually through the end of 2021 and meet in person again in February 2022.

    For more information on C and C++, please visit Red Hat Developer's topic page.

    Last updated: February 5, 2024

    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.