[Bug c++/97710] Help with breaking change? cast pointer-to-member address in template parameter list
mick.pearson at wildblue dot net
gcc-bugzilla@gcc.gnu.org
Wed Nov 4 11:57:40 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97710
--- Comment #5 from Mick P. <mick.pearson at wildblue dot net> ---
EDITED: In my example/link I changed the type from "int" to "char" by mistake,
but actually it shouldn't matter and using "int" produces even stranger results
that maybe should be investigated (using char for both produces the desired
diagnostic.)
Below is the "int" diagnostic, that looks erroneous in its own right
(nonsensical!)
><source>:4:17: error: '(int A::*)((0 == -1) ? ((long int)0) : (((long int)0) + 0))' is not a valid template argument for type 'int A::*'
><source>:4:17: note: it must be a pointer-to-member of the form '&X::Y'
More information about the Gcc-bugs
mailing list