Open shafik opened 5 months ago
N1543 "Analysis and Proposed Resolution for Core Issue 39" should help understanding the intent behind wording in class.member.lookup p6.
Note that a WG21 paper on this topic (P1697) was accepted by the evolution group in mid 2019(https://github.com/cplusplus/papers/issues/469), and was held up on implementation experience in CWG.
I suspect if an author can properly diagnose this as GCC does, they could/should also pick up P1697 and see if we can make this a hard-error via-standard rather than a warning.
Currently given the following C++ code:
gcc diagnoses this code under
-Wchanges-meaning
: https://godbolt.org/z/rY4W5h31nThis IFNDR according to class.member.lookup p6
gcc used to diagnose this under -fpermissive.
Maybe we should also consider supporting this diagnostic.