--- trunk/src/math/CubicSpline.cpp 2015/03/03 15:22:26 2057 +++ trunk/src/math/CubicSpline.cpp 2015/03/03 15:35:45 2058 @@ -319,7 +319,15 @@ std::vector CubicSpline::sort_permutation(std::ve std::vector CubicSpline::sort_permutation(std::vector& v) { std::vector p(v.size()); - std::iota(p.begin(), p.end(), 0); + + // 6 lines to replace std::iota(p.begin(), p.end(), 0); + int value = 0; + std::vector::iterator i; + for (i = p.begin(); i != p.end(); ++i) { + (*i) = value; + ++value; + } + std::sort(p.begin(), p.end(), OpenMD::Comparator(v) ); return p; }