The error was reported here: https://stackoverflow.com/questions/65079471/c-17-using-alias-template-bug-in-gcc A demo is here: https://godbolt.org/z/avGv3n
Please see https://gcc.gnu.org/bugs for the requested info.
The testcase from the godbolt link is: // { dg-options "-std=gnu++17" } #include <functional> template <typename T> struct CallableTrait; template <typename R, typename... Args> struct CallableTrait<std::function<R(Args...)>> { using ReturnType = R; }; template <typename Callable> using CallableTraitT = CallableTrait<decltype(std::function{std::declval<Callable>()})>; template <typename Callable> auto test(Callable&&) { using CallableInfo = CallableTraitT<Callable>; static_assert(!std::is_void_v<typename CallableInfo::ReturnType>); } int main() { test([]() { return 42; }); } It requires at least C++17.
Reduced: template<typename T> T&& declval(); template<typename R> struct function { template<typename T> function(T) { } }; template<typename T> function(T) -> function<decltype(declval<T>()())>; template<typename T> constexpr bool is_void_v = false; template<> constexpr bool is_void_v<void> = true; template <typename T> struct CallableTrait; template <typename R> struct CallableTrait<function<R>> { using ReturnType = R; }; template <typename Callable> using CallableTraitT = CallableTrait<decltype(function{declval<Callable>()})>; template <typename Callable> auto test(Callable&&) { using CallableInfo = CallableTraitT<Callable>; static_assert(!is_void_v<typename CallableInfo::ReturnType>); } int main() { test([]() { return 42; }); } 98077.C: In instantiation of ‘auto test(Callable&&) [with Callable = main()::<lambda()>]’: 98077.C:34:29: required from here 98077.C:29:20: error: invalid use of incomplete type ‘struct CallableTrait<main()::<lambda()> >’ 29 | static_assert(!is_void_v<typename CallableInfo::ReturnType>); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98077.C:14:8: note: declaration of ‘struct CallableTrait<main()::<lambda()> >’ 14 | struct CallableTrait; | ^~~~~~~~~~~~~
This is essentially a dup of the older 91911, I think *** This bug has been marked as a duplicate of bug 91911 ***