¡@

Home 

c++ Programming Glossary: other.marray

What is the copy-and-swap idiom?

http://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom

must be given in a more general case however std copy other.mArray other.mArray mSize mArray destructor ~dumb_array delete mArray.. given in a more general case however std copy other.mArray other.mArray mSize mArray destructor ~dumb_array delete mArray private.. other.mSize 3 mArray mSize new int mSize 0 3 std copy other.mArray other.mArray mSize mArray 3 return this And we say we're finished..

Move assignment operator and `if (this != &rhs)`

http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs

new int other.mSize nullptr mSize other.mSize std copy other.mArray other.mArray mSize mArray return this Explanation One of the.. nullptr mSize other.mSize std copy other.mArray other.mArray mSize mArray return this Explanation One of the more expensive.. assert this other delete mArray mSize other.mSize mArray other.mArray other.mSize 0 other.mArray nullptr return this In the typical..