diff --git a/eo/src/eoInt.h b/eo/src/eoInt.h index 8dc318e2c..3975743e8 100644 --- a/eo/src/eoInt.h +++ b/eo/src/eoInt.h @@ -45,8 +45,15 @@ template class eoInt: public eoVector * @param size Size of the std::vector * @param value fill the vector with this value */ - eoInt(unsigned size = 0, int value = 0): - eoVector(size, value) {} + eoInt(unsigned size = 0, int value = 0) : + eoVector(size, value) + {} + + /** Constructor copying from a vector (or an initialization list). + */ + eoInt(std::vector vec) : + eoVector(vec) + {} /// My class name. virtual std::string className() const diff --git a/eo/src/eoVector.h b/eo/src/eoVector.h index bdedd5e94..7bf28eaf4 100644 --- a/eo/src/eoVector.h +++ b/eo/src/eoVector.h @@ -73,6 +73,12 @@ public: : EO(), std::vector(_size, _value) {} + /** Constructor copying from a vector (or an initialization list). + */ + eoVector( std::vector vec ) + : EO(), std::vector(vec) + {} + /// copy ctor abstracting from the FitT template eoVector(const eoVector& _vec) : std::vector(_vec)