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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
   Last reconfirmed|                            |2021-07-23
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Here is a run time test:
struct Empty
{
        Empty& operator=(const Empty&) = default;
};

template<typename T>
class ShowType;

template<>
struct ShowType<Empty&>{int t = 0;};
template<>
struct ShowType<Empty>{int t = 1;};

int main()
{
        ShowType<decltype(Empty() = Empty())> example;
    return example.t;
}
---- CUT ----
A compile time test would just remove ShowType<Empty> specialization.

Reply via email to