Default function that just returns the passed value?
问题 As a lazy developer, I like to use this trick to specify a default function: template <class Type, unsigned int Size, class Function = std::less<Type> > void arrange(std::array<Type, Size> &x, Function&& f = Function()) { std::sort(std::begin(x), std::end(x), f); } But I have a problem in a very particular case, which is the following: template <class Type, unsigned int Size, class Function = /*SOMETHING 1*/> void index(std::array<Type, Size> &x, Function&& f = /*SOMETHING 2*/) { for