[Bug c++/72799] [C++11] ref-qualifiers are dropped from some function types
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 13 22:24:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72799
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-07-13
Blocks| |57255
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Current trunk:
72799.cc:10:12: error: no declaration matches 'void (S::* S::mfpmf() &&)()
const &'
10 | void (S::* S::mfpmf(void) &&)(void) const & { return &S::mf; } // ...
here...
| ^
72799.cc:5:12: note: candidate is: 'void (S::* S::mfpmf() &&)() const'
5 | rqft S::*mfpmf(void) &&;
| ^~~~~
72799.cc:3:8: note: 'struct S' defined here
3 | struct S {
| ^
72799.cc:18:18: error: cannot convert 'void (S::*)() const &' to 'pmft2' {aka
'void (S::*)() const'} in initialization
18 | pmft2 pmf2 = &S::mf;
| ^~
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57255
[Bug 57255] [meta-bug] ref-qualifiers
More information about the Gcc-bugs
mailing list