[llvm-bugs] [Bug 26769] New: Template template parameter in member initializer list is not recognized

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 29 03:10:55 PST 2016


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

            Bug ID: 26769
           Summary: Template template parameter in member initializer list
                    is not recognized
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nodakai at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

I tested this code with Clang++ 3.0, 3.8, G++ 4.4.7, 5.3.0, and ICC 13.0.1 (on
http://gcc.godbolt.org/) and got errors only with clang++.

----------------------------------------
template <class>
struct Parent {
};

template <template <class> class Parent_>
struct Child : Parent_<int> {
};

struct GrandChild : Child<Parent> {
  GrandChild() : Child<Parent>() { }
};

int main() {
}
----------------------------------------
tmpltmpl.cpp:10:24: error: template argument for template template parameter
must be a class template
  GrandChild() : Child<Parent>() { }
                       ^
tmpltmpl.cpp:10:18: error: expected class member or base class name
  GrandChild() : Child<Parent>() { }
                 ^
tmpltmpl.cpp:10:18: error: expected '{' or ','
3 errors generated.
----------------------------------------

-- 
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/20160229/4af39a10/attachment.html>


More information about the llvm-bugs mailing list