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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-14

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Clang gives:
<source>:7:8: error: cannot take address of consteval function 'f' outside of
an immediate invocation
  (t.*&test::f)();
       ^
<source>:2:17: note: declared here
  consteval int f() const { return 12; }
                ^

ICC accepts the code.
MSVC gives:
<source>(7): error C7596: 'test::f': cannot take address of immediate function
outside of an immediate invocation


Confirmed.

Reply via email to