[Bug c++/69701] New: "v.operator T()" incorrectly parsed if "v.T()" present.
eric at efcs dot ca
gcc-bugzilla@gcc.gnu.org
Fri Feb 5 22:43:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69701
Bug ID: 69701
Summary: "v.operator T()" incorrectly parsed if "v.T()"
present.
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric at efcs dot ca
Target Milestone: ---
Created attachment 37603
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37603&action=edit
reprodu
If a class "B" provides a conversion operator to class "A" and a method named
"A", then trying to explicitly call B's conversion operator will fail to
compile.
I'm not exactly sure what the standard requires, but IMHO B::A shouldn't affect
calls to "b.operator A()" outside of the class body.
More information about the Gcc-bugs
mailing list