https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119034
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > So the problem is not exactly an issue with ADL but rather an `overly strict > use of deleted function before argument-dependent lookup`. > > That is if I take the original testcase and remove `delete` and change the > return type to int for the function foo inside bar; GCC works. > > So this is another case of PR 68942. Yep, looks like the partial instantiation version of that PR. The error happens when substituting the outer args {true} into the alias member template. A minimal workaround is to use a function template for the deleted overload: template<class...> void func() = delete;