[llvm-bugs] [Bug 25483] Injected base class name not available when CRTP base class is instantiated using a subclass that is itself a template instantiation.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 10 18:17:17 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25483

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
The behaviour you're seeing is due to C++'s two-phase name lookup. For a name
like `A` in the base specifier, unqualified name lookup is performed in the
context of the template definition, not in the context of the instantiation,
and it does not look into dependent base classes. So lookup for `A` finds the
class template ::A, not the injected-class-name, and that is not valid here.

-- 
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/20151111/4867488b/attachment.html>


More information about the llvm-bugs mailing list