[llvm-bugs] [Bug 30586] New: Clang-cl Friend class error: elaborated type refers to a type alias

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 1 07:57:59 PDT 2016


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

            Bug ID: 30586
           Summary: Clang-cl Friend class error: elaborated type refers to
                    a type alias
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17392
  --> https://llvm.org/bugs/attachment.cgi?id=17392&action=edit
Reproduction

While trying to get an MSVC code base compiling with clang-cl, we ran against
following error: elaborated type refers to a type alias

Code (For full code, see attachment):
template<typename T>
struct A {};

template<typename T>
struct B
{
    using A = A<T>;
    friend class A;
};

int main(int argc, char **argv)
   {
   B<int> b;
   return 0;
   }

However, the same code does compile with MSVC2013.

Known workarounds:
 - drop the class-keyword
 - Use fully qualified name (A<T>) with friend declaration before the
using-statement

-- 
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/20161001/1d197d8b/attachment.html>


More information about the llvm-bugs mailing list