I want to populate a container from inside a function by passing an output iterator as this is the most efficient way to do it as I understand. e.g.
template
You don't need to. The code will fail to compile anyway if the caller passes the wrong iterator type.
So it's enforced for you already.