diff --git a/src/OpenMesh/Core/Geometry/Vector11T.hh b/src/OpenMesh/Core/Geometry/Vector11T.hh index bdc9db25..1a5fcf23 100644 --- a/src/OpenMesh/Core/Geometry/Vector11T.hh +++ b/src/OpenMesh/Core/Geometry/Vector11T.hh @@ -122,8 +122,12 @@ class VectorT { typename = typename std::enable_if::type, typename = typename std::enable_if< are_convertible_to::value>::type> - constexpr VectorT(T... vs) : values_ { {static_cast(vs)...} } - {} + constexpr VectorT(T... vs) : values_ { {static_cast(vs)...} } { + static_assert(sizeof...(T) == DIM, + "Invalid number of components specified in constructor."); + static_assert(are_convertible_to::value, + "Not all components are convertible to Scalar."); + } VectorT(const VectorT &rhs) = default; VectorT(VectorT &&rhs) = default;