[llvm-bugs] [Bug 38977] New: Member type hides template parameter of member template

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 17 08:15:44 PDT 2018


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

            Bug ID: 38977
           Summary: Member type hides template parameter of member
                    template
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: o_kniemeyer at maxon.de
                CC: llvm-bugs at lists.llvm.org

The following code


struct S
{
    template <int P> class N;
    using P = int;
};

template <int P> class S::N
{
    static const int C = P;
};


results in

error: unexpected type name 'P': expected expression
    static const int C = P;
                         ^
So Clang resolves P to the member type S::P, but it should resolve to the
template parameter of S::N.

-- 
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/20180917/a74e8649/attachment.html>


More information about the llvm-bugs mailing list