Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1.     Graph& operator=(const Graph& g) {
  2.       Graph tmp(g);
  3.       swap(tmp);
  4.       return *this;
  5.     }
  6.     void swap(Graph& g) {
  7.       ::swap(_n_nodes, g._n_nodes);
  8.       ::swap(_m, g._m);
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement