Skip to content

Commit

Permalink
[SIMULATION] Define missing assignment operator
Browse files Browse the repository at this point in the history
  • Loading branch information
aandvalenzuela committed Dec 1, 2023
1 parent 895df58 commit 5a38d04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class Basic3DVector<long double> {
/// constructor from 2D vector (X and Y from 2D vector, z set to zero)
Basic3DVector(const Basic2DVector<T>& p) : theX(p.x()), theY(p.y()), theZ(0), theW(0) {}

/// Assignment operator
Basic3DVector& operator=(const Basic3DVector&) = default;

/** Explicit constructor from other (possibly unrelated) vector classes
* The only constraint on the argument type is that it has methods
* x(), y() and z(), and that these methods return a type convertible to T.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class Basic2DVector {
/// Copy constructor from same type. Should not be needed but for gcc bug 12685
Basic2DVector(const Basic2DVector& p) : v(p.v) {}

/// Assignment operator
Basic2DVector& operator=(const Basic2DVector&) = default;

template <typename U>
Basic2DVector(const Basic2DVector<U>& p) : v(p.v) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class Basic3DVector {
/// Copy constructor from same type. Should not be needed but for gcc bug 12685
Basic3DVector(const Basic3DVector& p) : v(p.v) {}

/// Assignment operator
Basic3DVector& operator=(const Basic3DVector&) = default;

/// Copy constructor and implicit conversion from Basic3DVector of different precision
template <class U>
Basic3DVector(const Basic3DVector<U>& p) : v(p.v) {}
Expand Down

0 comments on commit 5a38d04

Please sign in to comment.