llvm / llvm-project

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

P0892R2: explicit(bool) #100597

Closed cjdb closed 2 weeks ago

cjdb commented 1 month ago

Link: https://wg21.link/p0892r2#library

llvmbot commented 1 month ago

@llvm/issue-subscribers-c-20

Author: Christopher Di Bella (cjdb)

**Link:** https://wg21.link/p0892r2
jkarns275 commented 1 month ago

Going to take a stab at this :)

jkarns275 commented 1 month ago

This has already been implemented: https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseDecl.cpp#L4428

cjdb commented 1 month ago

Thanks! Can you please update the status page and close this issue?

jkarns275 commented 1 month ago

I just checked and it looks like the status page does indeed reflect this, as of clang-9 it has been implemented. I don't have permission to close issues otherwise I would :p

cjdb commented 1 month ago

This issue is tracking the libc++ component of this paper, not Clang's.

jkarns275 commented 1 month ago

I see - apologies, I'm not very familiar with things around here :p. I will indeed try to make these changes then.

Rajveer100 commented 1 month ago

@cjdb This feature was introduced way back in C++20 I believe and should have been implemented in libcxx as well, I see several instances of this being used, did you mean to highlight any specific places that may have been missed out?

jkarns275 commented 1 month ago

@Rajveer100 I noticed that it is not implemented in std::optional yesterday. There may be a reason for it though as the new definitions including explicit(bool) were detailed in the synopsis.

cjdb commented 1 month ago

@cjdb This feature was introduced way back in C++20 I believe and should have been implemented in libcxx as well, I see several instances of this being used, did you mean to highlight any specific places that may have been missed out?

libc++ is not C++20 feature complete, so it being introduced in C++20 doesn't indicate very much. This issue is open because the libc++ status page has not marked it as completed, and thus we either need to implement it or mark it as completed in our status page.

philnik777 commented 1 month ago

I think this should just be marked as nothing to do, since the paper basically just replaces implementation magic with a language feature.

cjdb commented 1 month ago

I think this should just be marked as nothing to do, since the paper basically just replaces implementation magic with a language feature.

That's my hope too. I didn't read the library section closely enough to confirm that it only changes things in C++17.

ldionne commented 2 weeks ago

Closing as Nothing To Do since this indeed doesn't require any changes in the library.