https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> --- Reduced: template <typename _Tp> _Tp declval(); struct print_tag_; bool tag_invoke(print_tag_, auto); bool tag_invoke(print_tag_, auto obj) requires requires { *obj; }; template <typename CPO, typename... Args> auto try_tag_invoke() noexcept(tag_invoke(declval<CPO>, declval<Args>()...)) -> decltype(tag_invoke(CPO(), declval<Args>()...)); struct print_tag_ { void operator()(auto... args) noexcept(noexcept( try_tag_invoke<print_tag_, decltype(args)...>())); } print; void foo() { print(0); }