Skip to content

STL: Update __cpp_lib_concepts conditionals when all supported C++20 frontends support Concepts #395

@CaseyCarter

Description

@CaseyCarter

Quite a bit of C++20-only code in the STL which uses C++20's Concepts feature is currently guarded with #ifdef __cpp_lib_concepts. __cpp_lib_concepts is defined in <yvals_core.h> only if __cpp_concepts is defined, so the result is that parts of the library that need concepts are only available if the compiler supports concepts.

Once our C++20-supported compilers (MSVC, IntelliSense (EDG), and Clang) all support concepts, each occurrence of #ifdef __cpp_lib_concepts can and should be replaced with #if _HAS_CXX20. Occurrences of #if _HAS_CXX20 resulting from this process that are nested within #if _HAS_CXX20 or #if _HAS_CXX23 can then be made unconditional.

  • MSVC (supports concepts as of VS 16.3)
  • Clang (Clang 10 supports concepts)
  • EDG/IntelliSense

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions