In the example below, why does the last one calls the function overload with std::function as parameter?
#include <iostream>
#include <functional>
#include <memory>
template <class Type>
void make_something(Type&& a){
std::cout<<"Type&& overload"<<std::endl;
}
template <class Type>
void make_something(std::function<Type()>){
std::cout<<"std::function overload"<<std::endl;
}
int main(){
make_something<int>(1); // prints "Type&& overload"
make_something<int>(nullptr); // prints "std::function overload"
make_something<int*>(nullptr); // prints "Type&& overload"
using ptr_int = std::shared_ptr<int>;
make_something<ptr_int>(nullptr); // prints "std::function overload" ... why?
}