As a lazy developer, I like to use this trick to specify a default function:
template
There is the following variant with boost:
template > void index(std::array &x, Function&& f = boost::bind(std::plus(), 0, _1))