view gcc/testsuite/g++.dg/template/typedef23.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/42069
// { dg-do compile }

struct A
{
  static const int N = 0;
};

template<int> struct B {};

template<typename T, int>
struct C
{
  typedef T U;
  B<U::N> b;
};

template<typename T>
struct C<T*, 0>
{
  B<T::N> b;
};

C<A*, 0> c;