Code: Select all
constexpr auto Crapdaptor = [](auto&& function)
{
return [function](auto&& left_ptr, auto&& right_ptr)
{
return function(*left_ptr, *right_ptr);
};
};
Code: Select all
std::sort(v.begin(),v.end(),Crapdaptor(std::mem_fn(&Foo::operator>)));