llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.64k stars 11.37k forks source link

Clang C++20 Feature: P2493R0 - Missing feature test macros for C++20 core papers #54052

Closed tstellar closed 2 weeks ago

tstellar commented 2 years ago

id: P2493R0 paper: https://wg21.link/p2493r0

llvmbot commented 2 years ago

@llvm/issue-subscribers-c-20

MarcusBoay commented 2 years ago

Patch for this here: https://reviews.llvm.org/D120456

llvmbot commented 2 years ago

@llvm/issue-subscribers-clang-driver

royjacobson commented 1 year ago

@erichkeane @AaronBallman After the deferred concepts patch got merged, are there any other open concepts bugs that you'd like to prioritize before bumping up __cpp_concepts?

erichkeane commented 1 year ago

I'd like to see us get p857 done, and at least a majority of the work on p2113 done before we consider concepts "done" enough to up the macro.

I believe there are patches being worked on for both, so I'd be open to a patch to change the macro as soon as those go on.

royjacobson commented 1 year ago

Sounds good to me :)

JVApen commented 1 year ago

The status page indicates this paper was implemented in clang10. Should that be changed?

AaronBallman commented 1 year ago

The status page indicates this paper was implemented in clang10. Should that be changed?

Given that this work is taking some time, it might make sense for us to mark the paper as being partially implemented with an explanation as to what's missing.

Jannik2099 commented 5 months ago

Any update on this? libstdc++ is gating some C++23 features (namely std::expected) behind this.

erichkeane commented 4 months ago

According to https://clang.llvm.org/cxx_status.html we mention two DRs, but they aren't SUPER related here? We have some problems with deleted special member functions (of which, concepts makes WORSE), but I don't think this should hold up on concepts.

I believe it should be OK to update this feature test macro for Clang19. The std::expected being gated behind this is unfortunate, and I think that is more important than my lingering doubt on this feature.

So: if someone submits a patch to update this in Clang, i'd accept it.

AaronBallman commented 4 months ago

Because it's early enough in the 19.x cycle and we think our concepts support is reasonably usable, I support setting the feature test macro and giving ourselves some time to see whether that shakes out further issues we need to address before releasing with the macro enabled.

cor3ntin commented 2 weeks ago

Fixed by #87998