diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 8eacf0b24..9eb42a6c2 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -209,7 +209,7 @@ public: os << FitnessTraits::getDescription(i) << " = " << operator[](i) << " "; } - // Comparison, using less by default + //! Comparison, using less by default bool operator<(const eoScalarFitnessAssembled& other) const{ if ( empty() || other.empty() ) return false; @@ -217,6 +217,12 @@ public: return Compare()( front() , other.front() ); } + //! Comparison with ScalarTypes. Explicit definition needed to compile with VS 8.0 + bool operator<(ScalarType x) const{ + eoScalarFitnessAssembled ScalarFitness(x); + return this->operator<(ScalarFitness); + } + // implementation of the other operators bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; }