template<typename EdgePredecessorMap, typename VertexPredecessorMap,
typename EdgeIndexMap, typename VertexDescriptor>
std::vector<int> translate_to_edges_index(const EdgePredecessorMap& em,
const VertexPredecessorMap& vm, const EdgeIndexMap& im, VertexDescriptor
dest)
{
       std::vector<int> res;
       while(vm[dest] != dest)
       {
               res.push_back(im[em[dest]]);
               dest = vm[dest];
       }
       return res;
}

I would recommend using the get() and put() functions for property maps instead of operator[]. It allows a broader class of property maps to be used with the algorithm.
 
Andrew Sutton
andrew.n.sutton@gmail.com