This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/57868] New: misleading location for invalid variadic template


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57868

            Bug ID: 57868
           Summary: misleading location for invalid variadic template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: akim.demaille at gmail dot com

Hi all,

It's a detail, agreed, but below the location for the error could use
improvement:

$ cat parameter-pack.cc
template <typename... A, typename... B>
struct foo
{};

With g++-mp-4.9:
parameter-pack.cc:2:8: error: parameter pack 'A' must be at the end of the
template parameter list
 struct foo
        ^
 g++-mp-4.9: 1 


For the records, this is what clang++-mp-3.3 says:
parameter-pack.cc:1:23: error: template parameter pack must be the last
template parameter
template <typename... A, typename... B>
                      ^
1 error generated.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]