Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-this1.C

raw
1 // PR c++/98800
2 // { dg-do compile { target c++11 } }
3
4 template <bool> struct enable_if_t {};
5 struct tmp {
6 template <class> constexpr bool is_integral();
7 template <class E> static auto func() -> enable_if_t<is_integral<E>()>; // { dg-error "without object" }
8 };
9 template <class> constexpr bool tmp::is_integral() { return true; }
10 int main() { tmp::func<int>(); } // { dg-error "no match" }