[LLVMbugs] [Bug 11306] New: Variadic template fix-it suggestion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 4 04:49:13 PDT 2011


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

             Bug #: 11306
           Summary: Variadic template fix-it suggestion
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


A few times I have written (note the ... in the wrong place on the template)

template<typename Args...>
int f(Args...)
{ }

The current error is the not very helpful:

t.cc:1:23: error: expected ',' or '>' in template-parameter-list
template<typename Args...>
                      ^
t.cc:1:26: error: expected unqualified-id
template<typename Args...>
                         ^
Something nicer, with a fix-it, would be nice.

The similar:

template<typename... Args>
int f(Args args...)
{ }

Produces the nicer (but still no fixit)


t.cc:2:5: error: declaration type contains unexpanded parameter pack 'Args'
int f(Args args...)
    ^ ~~~~

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list