// PR c++/97399 // { dg-do compile { target c++11 } } template struct enable_if_t {}; struct tmp { template static constexpr bool is_integral(); template static auto f() -> enable_if_t()>; template friend auto g(tmp, T) -> enable_if_t()>; }; template constexpr bool tmp::is_integral() { return true; } template auto tmp::f() -> enable_if_t()> { return {}; } int main() { tmp::f(); g(tmp{}, 0); }