https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109018
--- Comment #7 from qingzhe huang <nickhuang99 at hotmail dot com> --- I find another argument from decltype in cppreference (https://en.cppreference.com/w/cpp/language/decltype#Explanation) quote: Because no temporary object is created, the type need not be complete or have an available destructor, and can be abstract. This rule doesn't apply to sub-expressions: in decltype(f(g())), g() must have a complete type, but f() need not. Does this mean that here "f" needs not be available when "g" is int which is always complete? So, in our example the function "g" (aka "f" here) needs not be available.