Advanced Search
Stay Signed In
Don't have an account yet?
Start a Free Trial
Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
A swap function typically looks like this, where U is some user-defined type:
class T { // ... public: void swap( T& rhs ) { member1_.swap( rhs.member1_ ); std::swap( member2_, rhs.member2_ ); } private: U member1_; int member2_; };
You are currently reading a PREVIEW of this book.
Get instant access to over $1 million worth of books and videos.