This patch allows pointer to const& member functions on rvalues for C++20, and as an extension for prior versions. This is P0704r1.
I would be inclined to use an Extension rather than an ExtWarn for this. (I really don't see why we didn't move this as a DR -- it seems to be obviously a defect rather than an extension to me.)
Hmm, this seems hard to express clearly and concisely. How about something like:
"invoking a pointer to a 'const &' member function on an rvalue is a C++2a extension"
Please mark this as SFINAEFailure too; if we're going to reject under -pedantic-errors, we should also treat it as SFINAEable.
Thanks, will you need someone to commit this for you?
|794 ↗||(On Diff #111602)|
We've historically avoided using precise year numbers until a standard is finalized. I would call this CXX2a for now, and only provide the c++2a-extensions spelling, just in case the next standard ships a year late (or early).
Please also update this to match the prior diagnostic's text.
This should now be in a CXXPre2aCompatPedantic group, because the corresponding extension is a pedantic warning.