https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119034
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > This is odd, doing this: > ``` > namespace foo > { > struct X { }; > void func(X) { } > } > > namespace bar > { > int func() = delete; > template<typename T> > using type = decltype(func(T{})); // #2 > } > > template<typename, typename> constexpr bool is_same_v = false; > template<typename T> constexpr bool is_same_v<T, T> = true; > > static_assert( is_same_v<bar::type<foo::X>, void> ); > ``` > > Works This started to work in GCC 12 (a variant of it [changing the template variable] was failing since at least 4.9.0) so that might give an hint of where the problem is located.