// PR c++/104425 // { dg-do compile { target c++11 } } namespace A { class foo {}; } namespace B { class bar {}; } A::foo& operator<<(A::foo& f, const B::bar&); namespace C { template T val(); A::foo& operator<<(A::foo& f, int in); template struct has_insertion_operator { static constexpr bool value = false; }; template struct has_insertion_operator() << val(), void())> { static constexpr bool value = true; }; } static_assert(!C::has_insertion_operator::value, "");