1 // PR c++/70642
2 // { dg-do compile { target c++11 } }
3 
4 template<bool, class> struct enable_if {};
5 template<class T> struct enable_if<true, T> { using type = T; };
6 
7 template <typename X>
8 struct foo
9 {
10      template <typename R>
11      using meow = typename enable_if<sizeof(X) == 0, R>::type; // { dg-error "no type named .type." }
12 
13      template <typename R = int>       // 1
14      meow<R> bar () = delete;
15 
16      int bar ()
17      {
18         meow<int> i;          // 2
19         return 0;             // 3
20      }
21 };
22 
23 int j = foo<long>().bar();
24