diff --git a/eo/src/eoReduce.h b/eo/src/eoReduce.h index 53d8e427..4f7c2f34 100644 --- a/eo/src/eoReduce.h +++ b/eo/src/eoReduce.h @@ -55,7 +55,7 @@ template class eoTruncate : public eoReduce if (_newgen.size() < _newsize) throw std::logic_error("eoTruncate: Cannot truncate to a larger size!\n"); - _newgen.nth_element(_newsize); + sort(_newgen.begin(), _newgen.end()); _newgen.resize(_newsize); } };