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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-11
           Severity|minor                       |enhancement
     Ever confirmed|0                           |1
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We get now:

<source>:6:6: error: no match for 'operator+' (operand types are 'l' and
'void')
    6 |  l() + m.~f;
      |  ~~~ ^ ~
      |  |     |
      |  l     void
<source>:2:22: note: candidate: 'template<int D> void operator+(l, int)'
    2 | template<int D> void operator+(l x, int y);
      |                      ^~~~~~~~
<source>:2:22: note:   template argument deduction/substitution failed:
<source>:6:11: note:   couldn't deduce template parameter 'D'
    6 |  l() + m.~f;
      |           ^


clang gives an extra error message:
<source>:6:8: error: reference to pseudo-destructor must be called; did you
mean to call it with no arguments?
 l() + m.~f;
       ^~~~
           ()

Reply via email to