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++/59701] New: A variadic alias template aliasing another variadic alias template doesn't work


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

            Bug ID: 59701
           Summary: A variadic alias template aliasing another variadic
                    alias template doesn't work
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ville.voutilainen at gmail dot com

template<typename... Args> struct foo { };
template<typename T, typename... Args> using bar = foo<T, Args...>;
template<typename T, typename... Args> using baz = bar<Args..., T>;

int
main (int argc, char *argv[])
{

}

This gives

edoceo7.cpp: In substitution of âtemplate<class T, class ... Args> using bar =
foo<T, Args ...> [with T = Args ...; Args = {<expression error>}]â:
edoceo7.cpp:3:66:   required from here
edoceo7.cpp:2:67: error: template argument 2 is invalid
 template<typename T, typename... Args> using bar = foo<T, Args...>;
                                                                   ^
Multiple clang versions accept the code. Some clang versions ICE on it, but
that's another matter. :)

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