While doing some Angle testing with the new toolchain (VS 2022 and the Windows 11 SDK) ynovikov@ and I noticed that abseil (any_invocable_test.cc to be specific) used shared_ptr<T>::unique, which is deprecated in C++17 and goes away in C++20. That is, abseil is actually not compatible with C++20.The calls to unique() - and some other abseil code - fail in C++20 mode with VC++, which is how this was noticed.It looks like abseil targets C++14 and C++17 so this isn't really an abseil bug, but something that we should be aware of. Maybe it's worth pushing to get the .unique() calls replaced with use_count() == 1 for greater C++20 compatibility?
On Thursday, February 2, 2023 at 2:11:13 PM UTC-10 Peter Kasting wrote:C++20 is now on by default for all platforms, and one of the last stages to announce support is to update c++-features.md to cover it. I plan to do this, along with updating PRESUBMIT.py to enforce banned features (where easy).Historically, we've initially marked everything "TBD" (i.e. banned), which leads to a flurry of proposals to allow clearly-safe things right away, and a lot of flux. So I propose doing more thoughtful marking to start with. Instead of a huge email thread, I've put up a skeleton CL where I briefly name all new features (and the cppreference.com link), along with my rationale for why I've put them in particular lists.If you would like to have input, please leave review comments on that CL. We can then debate as needed in comments there.If you have looked at the CL and have no further comments/objections, you can leave a +1 there; I will not actually land until there seems to be consensus (and I have updated these to full-fledged entries like elsewhere in the doc).P{K
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/24222880-76dd-4ef0-a83e-66b388a45d6cn%40chromium.org.
On Wed, Feb 15, 2023 at 3:43 PM 'Bruce Dawson' via cxx <c...@chromium.org> wrote:While doing some Angle testing with the new toolchain (VS 2022 and the Windows 11 SDK) ynovikov@ and I noticed that abseil (any_invocable_test.cc to be specific) used shared_ptr<T>::unique, which is deprecated in C++17 and goes away in C++20. That is, abseil is actually not compatible with C++20.The calls to unique() - and some other abseil code - fail in C++20 mode with VC++, which is how this was noticed.It looks like abseil targets C++14 and C++17 so this isn't really an abseil bug, but something that we should be aware of. Maybe it's worth pushing to get the .unique() calls replaced with use_count() == 1 for greater C++20 compatibility?Interesting. https://github.com/llvm/llvm-project/blob/e6fbfb1ff1d352b2f8f0b6d39f4665fd91f0d21d/libcxx/include/__memory/shared_ptr.h#L866-L870 libc++ did not remove it yet for C++20 mode.
I can try and patch abseil internally for this.
The other error that VC++ reported in abseil (after patching in a fix for the unique() issue) can be found here.