The main difference is that irange is a random-access range while counting_range isn't. counting_range is based on Boost.Iterator's counting_iterator which uses all the underlying integers operations directly. Integers in C++ almost fit the iterator concept: the only thing missing is an operator*. counting_iterator provides an operator* as an identity operation and forwards everything else to the underlying type.

Source