Please fix the formatting in your post. I can't figure out what you are trying to do with this call back. Please give a description of what your goal is.
By default, boost::bind() makes a copy of the parameters that it needs to pass to
the function. Therefore, line 23 makes a copy of the map<> and line 12 makes a copy
of the map<>. You then compare the iterator i, which is an iterator into the original map,
against end() called on a copy. The condition will never be true.
To fix use boost::ref:
call( boost::bind( &fn, boost::ref( m ), m.begin() );
This now stores only a reference to the container and not the container itself.