Changeset 3589


Ignore:
Timestamp:
Jan 19, 2017, 3:10:56 PM (5 years ago)
Author:
Peter
Message:

move assignment for Vector; refs #878

Location:
trunk/yat/utility
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Vector.cc

    r3587 r3589  
    237237
    238238
     239  Vector& Vector::operator=(Vector&& other )
     240  {
     241    std::swap(vec_, other.vec_);
     242    std::swap(const_vec_, other.const_vec_);
     243    return *this;
     244  }
     245
     246
    239247}}} // of namespace utility, yat, and thep
  • trunk/yat/utility/Vector.h

    r3587 r3589  
    144144    const Vector& operator=(const Vector&);
    145145
     146#ifdef YAT_HAVE_RVALUE
     147    /**
     148       \brief The move assignment operator.
     149
     150       \note Invalidates views and iterators of Vector.
     151
     152       \return A reference to the resulting Vector.
     153    */
     154    Vector& operator=(Vector&&);
     155#endif
     156
    146157    /**
    147158       \brief The assignment operator.
Note: See TracChangeset for help on using the changeset viewer.