[Clang] Unexpected results from __reference_{constructs,converts}_from_temporary
#114344
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
It seems that the following
static_assert
's should pass, but Clang currently rejects them (link).const int
prvalue" needs to be adjusted to "int
prvalue", so there shouldn't be cv-qualification dropping and the binding to temporary object should be valid.decltype(std::declval<Fun>())
isFun&
whenFun
is a normal function type, the reference binding should be valid. But despite the binding being valid or not, there can never be a temporary and thus the traits should reportfalse
.This probably doesn't block the library implementation of P2255R2 because workaround can be easily implemented.
Moreover, the results of these traits is a bit unclear to me for the following cases (link):
It seems that the abstractness of the class should be ignored in the spirit of P0929R2 (so Clang is giving correct results for the
Abstract
case), but this doesn't seem clear in the current standard wording.The case for
int[]
is really weird as there's no prvalue of typeT[]
.CC @cjdb @cor3ntin @timsong-cpp
The text was updated successfully, but these errors were encountered: