Explicit assignment in copy constructors

This commit is contained in:
King_DuckZ 2021-04-08 12:07:24 +02:00
parent 9d63269bfa
commit 2c1bf17c6b
1 changed files with 4 additions and 4 deletions

View File

@ -252,7 +252,7 @@ namespace vwr {
static const Vec<V, 1> unit_x;
Vec ( void ) = default;
Vec ( const Vec& ) = default;
Vec ( const Vec& parOther ) { implem::assign_same_type(*this, parOther); }
Vec ( const vector_type& parIn ) : implem::VecBase<V>(parIn) { }
template <typename T>
explicit Vec ( const typename std::enable_if<std::is_same<T, scalar_type>::value and not std::is_same<scalar_type, vector_type>::value, T>::type& parX ) : implem::VecBase<V>(parX) { }
@ -280,7 +280,7 @@ namespace vwr {
static const Vec<V, 2> unit_y;
Vec ( void ) = default;
Vec ( const Vec& ) = default;
Vec ( const Vec& parOther ) { implem::assign_same_type(*this, parOther); }
Vec ( const vector_type& parIn ) : implem::VecBase<V>(parIn) { }
explicit Vec ( const scalar_type parX ) : implem::VecBase<V>(parX) { }
Vec ( scalar_type parX, scalar_type parY ) : implem::VecBase<V>(parX, parY) { }
@ -310,7 +310,7 @@ namespace vwr {
static const Vec<V, 3> unit_z;
Vec ( void ) = default;
Vec ( const Vec& ) = default;
Vec ( const Vec& parOther ) { implem::assign_same_type(*this, parOther); }
Vec ( const vector_type& parIn ) : implem::VecBase<V>(parIn) { }
explicit Vec ( const scalar_type parX ) : implem::VecBase<V>(parX) { }
Vec ( scalar_type parX, scalar_type parY, scalar_type parZ ) : implem::VecBase<V>(parX, parY, parZ) { }
@ -341,7 +341,7 @@ namespace vwr {
static const Vec<V, 4> unit_w;
Vec ( void ) = default;
Vec ( const Vec& ) = default;
Vec ( const Vec& parOther ) { implem::assign_same_type(*this, parOther); }
Vec ( const vector_type& parIn ) : implem::VecBase<V>(parIn) { }
explicit Vec ( const scalar_type parX ) : implem::VecBase<V>(parX) { }
Vec ( scalar_type parX, scalar_type parY, scalar_type parZ, scalar_type parW ) : implem::VecBase<V>(parX, parY, parZ, parW) { }