This is the mail archive of the gcc-patches@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]

Implement N4051 - Allow typename in a template template parameter


This little annoyance has bugged me a couple of times over the years:

template<typename T> struct A {};
template<typename T> using B = int;

template<template<typename> class X> struct C;
C<A> ca; // ok
C<B> cb; // ok, not a class template
template<template<typename> typename X> struct D; // error, cannot use typename here


C++17 it seems allows typename in template template parms.

Built and tested on x86_64-linux.  Allowed with std=gnu/c++1z of course.

OK?

Attachment: CL_typename_template_template
Description: Text document

Attachment: patch_typename_template_template_2
Description: Text document


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