Permalink
Browse files

Added definitions for copy constructor and assignment operator

  • Loading branch information...
1 parent d6b146a commit 2a19f655cae1a2e580dcc1de126e331f7ebf333e @kyamagu committed Feb 20, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 include/MxArray.hpp
View
@@ -25,6 +25,14 @@
class MxArray {
public:
MxArray(const mxArray *arr);
+ /// Copy constructor
+ MxArray(const MxArray& arr) : p_(arr.p_) {}
+ /// Assignment operator
+ MxArray& operator= (const MxArray& rhs) {
+ if (this != &rhs)
+ this->p_ = rhs.p_;
+ return *this;
+ }
explicit MxArray(const int i);
explicit MxArray(const double d);
explicit MxArray(const bool b);

0 comments on commit 2a19f65

Please sign in to comment.