[Bug c++/48665] type of const member function
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 19 21:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665
--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's not valid.
[expr.typeid] p5 says typeid(cv T) is the same as typeid(T) but that isn't
relevant here. 'void () const' is not the cv-qualified version of 'void ()',
because there are no cv-qualified function types. See [dcl.fct] p7.
'void () const' is a function type with a cv-qualifier-seq and can only appear
in a few specific places, which does not include a typeid expression. See
[dcl.fct] p6.
More information about the Gcc-bugs
mailing list