[libcxx-commits] [libcxx] [libc++][ranges] use `static operator()` for C++23 ranges (PR #86052)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 22 03:59:36 PDT 2024


mordante wrote:

> > > Once this pull request is merged, it's worth considering backporting this feature to those related to C++20 ranges, given that both Clang and GCC have implemented language extensions that support `static operator()` in C++20. I'm willing to submit a pull request if that's a good idea.
> > 
> > 
> > I'm strongly against that idea. We agreed to allowed a small set of extensions to be used in older language versions to make the maintenance between language versions easier.
> 
> That was ever part of the reasoning. It's to reduce maintenance burden in general and possibly improve the QoI. IMO this clearly falls under "improve the QoI".

I strongly disagree with this statement, especially the "clearly" part. I have not seen any numbers proving this change has a measurable benefit on code size or performance. Without these I don't know whether this will be a measurable improvement and when it is not how much.

> > We explicitly did not allow to use all extensions.
> 
> Yes. But that doesn't prevent us from allowing more useful extensions, such as this one.

It does not per se, but this is what we discussed and agreed upon. We didn't want to blanket allow all possible extensions.



https://github.com/llvm/llvm-project/pull/86052


More information about the libcxx-commits mailing list