/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / var-templ42.C
blobde11b26a99f44bf7f0937f976d5cee9c4c9e3fb8
1 // PR c++/67131
2 // { dg-do compile { target c++14 } }
4 template <typename T> typename T::_ type;
5 template <template <typename...> class> struct A;
6 template <template <typename> class f> A<f> metafunction;
7 namespace detail {
8 template <typename> struct _decltype;
10 template <template <typename...> class F> struct A {
11   template <typename... T>
12   auto operator()() -> decltype(type<F<detail::_decltype<T>...>>);
14 template <typename F> auto valid_call(F f) -> decltype(f());
15 constexpr auto valid_call(...) { return 0; }
16 template <typename> struct no_type;
17 static_assert(!valid_call(metafunction<no_type>),"");