view gcc/testsuite/g++.dg/template/using18.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/23211
// { dg-do compile }

template<class T>
struct foo 
{
  typedef int jtype;
  struct bar 
  {
    using typename foo<T>::jtype; // { dg-error "not a base type" }
    using foo<T>::jtype; // { dg-error "not a base type" }
  };
};

template <class T>
struct A : T
{
    using T::i;
    using typename T::type;
};

struct B1 {};
template <class T> struct B2 {};

template <class T>
struct C : B1, B2<T>
{
    using B1::x; // { dg-error "has not been declared" }
    using B2<T>::y;
    using typename B2<T>::type;
};