Consider following comparison function:
bool compare(std::shared_ptr &lhs, std::shared_ptr &rhs){
return lhs->val
The comparator passed to the template has to be the type of something that can be called with the function call operator. That would be either a class that has overloaded that operator, or the type of a lambda or a function pointer. In the cunstrutor of set, an instance of that type has to be passed. So decltype(compare)*
is the function pointer type, and &compare
is the function pointer.