[llvm-bugs] [Bug 41785] Making class template breaks compilation
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 14 00:01:18 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41785
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #4 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This program violates http://eel.is/c++draft/basic.scope.class#2:
"A name N used in a class S shall refer to the same declaration in its context
and when re-evaluated in the completed scope of S. No diagnostic is required
for a violation of this rule."
... because the name e would refer to a different declaration of evaluated in
the complete class scope.
This is a particularly odd manifestation of this rule; when parsing the
template we decide the two members are declaring the same function because
their lookups cannot result in different e's, because of the above rule.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191014/f7306c60/attachment-0001.html>
More information about the llvm-bugs
mailing list