Just set some functions to use the C++ std::map inside Modern Fortran. Doesn't duplicate the mapping algorithm.