replace boost::irange in Tools