mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-10 06:00:45 +01:00
Rely on default constructors
This commit is contained in:
parent
3954792f37
commit
0b165afd9e
@ -35,6 +35,12 @@ public:
|
|||||||
// Scalar no action
|
// Scalar no action
|
||||||
// template<int Level> using tensor_reduce_level = typename iScalar<GridTypeMapper<vtype>::tensor_reduce_level<Level> >;
|
// template<int Level> using tensor_reduce_level = typename iScalar<GridTypeMapper<vtype>::tensor_reduce_level<Level> >;
|
||||||
iScalar() = default;
|
iScalar() = default;
|
||||||
|
/*
|
||||||
|
iScalar(const iScalar<vtype> ©me)=default;
|
||||||
|
iScalar(iScalar<vtype> &©me)=default;
|
||||||
|
iScalar<vtype> & operator= (const iScalar<vtype> ©me) = default;
|
||||||
|
iScalar<vtype> & operator= (iScalar<vtype> &©me) = default;
|
||||||
|
*/
|
||||||
iScalar(scalar_type s) : _internal(s) {};// recurse down and hit the constructor for vector_type
|
iScalar(scalar_type s) : _internal(s) {};// recurse down and hit the constructor for vector_type
|
||||||
iScalar(const Zero &z){ *this = zero; };
|
iScalar(const Zero &z){ *this = zero; };
|
||||||
|
|
||||||
@ -45,8 +51,6 @@ public:
|
|||||||
friend strong_inline void vstream(iScalar<vtype> &out,const iScalar<vtype> &in){
|
friend strong_inline void vstream(iScalar<vtype> &out,const iScalar<vtype> &in){
|
||||||
vstream(out._internal,in._internal);
|
vstream(out._internal,in._internal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
friend strong_inline void zeroit(iScalar<vtype> &that){
|
friend strong_inline void zeroit(iScalar<vtype> &that){
|
||||||
zeroit(that._internal);
|
zeroit(that._internal);
|
||||||
}
|
}
|
||||||
@ -76,11 +80,9 @@ public:
|
|||||||
*this = (*this)+r;
|
*this = (*this)+r;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
strong_inline vtype & operator ()(void) {
|
strong_inline vtype & operator ()(void) {
|
||||||
return _internal;
|
return _internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
strong_inline const vtype & operator ()(void) const {
|
strong_inline const vtype & operator ()(void) const {
|
||||||
return _internal;
|
return _internal;
|
||||||
}
|
}
|
||||||
@ -125,6 +127,12 @@ public:
|
|||||||
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1};
|
enum { TensorLevel = GridTypeMapper<vtype>::TensorLevel + 1};
|
||||||
iVector(const Zero &z){ *this = zero; };
|
iVector(const Zero &z){ *this = zero; };
|
||||||
iVector() =default;
|
iVector() =default;
|
||||||
|
/*
|
||||||
|
iVector(const iVector<vtype,N> ©me)=default;
|
||||||
|
iVector(iVector<vtype,N> &©me)=default;
|
||||||
|
iVector<vtype,N> & operator= (const iVector<vtype,N> ©me) = default;
|
||||||
|
iVector<vtype,N> & operator= (iVector<vtype,N> &©me) = default;
|
||||||
|
*/
|
||||||
|
|
||||||
iVector<vtype,N> & operator= (const Zero &hero){
|
iVector<vtype,N> & operator= (const Zero &hero){
|
||||||
zeroit(*this);
|
zeroit(*this);
|
||||||
@ -205,8 +213,12 @@ public:
|
|||||||
|
|
||||||
iMatrix(const Zero &z){ *this = zero; };
|
iMatrix(const Zero &z){ *this = zero; };
|
||||||
iMatrix() =default;
|
iMatrix() =default;
|
||||||
|
/*
|
||||||
|
iMatrix(const iMatrix<vtype,N> ©me)=default;
|
||||||
|
iMatrix(iMatrix<vtype,N> &©me)=default;
|
||||||
|
iMatrix<vtype,N> & operator= (const iMatrix<vtype,N> ©me) = default;
|
||||||
|
iMatrix<vtype,N> & operator= (iMatrix<vtype,N> &©me) = default;
|
||||||
|
*/
|
||||||
iMatrix<vtype,N> & operator= (const Zero &hero){
|
iMatrix<vtype,N> & operator= (const Zero &hero){
|
||||||
zeroit(*this);
|
zeroit(*this);
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user