Hi,

On 04/02/19 15:47, Jason Merrill wrote:
On 2/1/19 3:52 PM, Paolo Carlini wrote:
Hi,

I think that this ICE on invalid (and valid, for c++17+) can be in fact avoided by accepting in make_typename_type a TYPE_PACK_EXPANSION as context, thus by not triggering the "‘T ...’ is not a class" error. Not sure if a better fix would be something more general. Note, anyway, that we are asserting TYPE_P (context) thus TYPE_PACK_EXPANSIONs definitely get through beyond MAYBE_CLASS_TYPE_P.
The testcase should test that the using actually works, i.e. imports a type from a base class.

Uhm, if I change the testcase to something like:

struct B { typedef int type; };

template<typename ...T> struct C : T... {
  using typename T::type ...;
  void f() { type value; }
};

template class C<B>;

we get a "sorry, unimplemented: use of ‘type_pack_expansion’ in template" for value, which, arguably, is better than the current ICE, but I'm not sure if we are close to completing the implementation of this / we even want to attempt that at this Stage?!?

Thanks, Paolo.


Reply via email to