[Bug c++/107085] __reference_constructs_from_temporary does not detect static up-cast

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 29 10:46:47 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107085

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
#include <type_traits>
using namespace std;
struct Base {};
struct Derived : Base {};
static_assert( conjunction_v<is_reference<Base&>, is_constructible<Base&,
Derived>> );

This fails (as expected) and so the reference_constructs_from_temporary is
required to be false.


More information about the Gcc-bugs mailing list