Member type result_type
1) (deprecated in C++17) If F is a pointer to function or a pointer to member function, result_type is the return type of F. If F is a class type with nested typedef result_type, then result_type is F::result_type. Otherwise no result_type is defined.
2) (deprecated in C++17) result_type is exactly R.
With C20, the return type of F is unspecified.
I have no clue what auto does with an unspecified return type.
The result of the call to bind is a function object that's roughly equivalent to this lambda expression: []{ return [](int x) { return x*2; }(3) };
It has no parameters.
This reflects the purpose of bind, which is to to associate ("bind") a concrete value to a parameter ("free variable"). The terminology comes from lambda calculus.
With C20, the return type of F is unspecified.
It means that C++ standard doesn't say what type should be returned from std::bind. It still has a normal return type, but it's chosen by the implementation at its discretion.
It means that C++ standard doesn't say what type should be returned from std::bind. It still has a normal return type, but it's chosen by the implementation at its discretion.
Looking at what the return type is when compiling with MSVC the lambda has a return type of int, if I'm reading the expansion correctly. The entire expanded return type uses a couple of MSVC implementation helpers, std::_Binder and std::_Unforced, along with the lambda.