[LLVMbugs] [Bug 15276] New: Expanding template parameter pack followed by additional arguments into alias template trips assertion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 15 10:11:23 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15276

            Bug ID: 15276
           Summary: Expanding template parameter pack followed by
                    additional arguments into alias template trips
                    assertion
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: illissius at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10022
  --> http://llvm.org/bugs/attachment.cgi?id=10022&action=edit
preprocessed source

The smallest program I found which trips the assertion is:

    template<typename... Ts>
    struct Foo
    {
        template<typename U>
        void foo();
    };

    template<typename... Ts>
    using Bar = Foo<Ts...>;

    template<typename... Ts>
    template<typename U>
    void Foo<Ts...>::foo()
    {
        Bar<Ts..., U> bar;
    }

Any of the following make it go away:

 - Bar<Ts...> instead of Bar<Ts..., U>
 - Bar<U, Ts...> instead of Bar<Ts..., U>
 - Foo<Ts..., U> instead of Bar<Ts..., U>
 - using Bar = int; instead of using Bar = Foo<Ts...>;

Clang 3.1 and 3.2 both assert.

-- 
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/20130215/1524bdab/attachment.html>


More information about the llvm-bugs mailing list