Skip to content

Value of __cpp_constexpr is incorrect for -std=c++20 #129730

@elbeno

Description

@elbeno

When compiling with -std=c++20, clang defines __cpp_constexpr to be 201907L, and it should be 202002L.

https://godbolt.org/z/G6v7EvEfe

Clearly clang has support for https://wg21.link/P1330.

So the value of __cpp_constexpr in C++20 should be 202002L as given by https://wg21.link/p2493 and https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#__cpp_constexpr

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions