swap.cpp 532 B

123456789101112131415161718192021
  1. // Copyright (C) Ben Pope 2014.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/graph/directed_graph.hpp>
  6. #include <boost/graph/undirected_graph.hpp>
  7. template<typename Graph>
  8. void test_member_swap()
  9. {
  10. Graph lhs, rhs;
  11. lhs.swap(rhs);
  12. }
  13. int main()
  14. {
  15. test_member_swap<boost::adjacency_list<> >();
  16. test_member_swap<boost::directed_graph<> >();
  17. test_member_swap<boost::undirected_graph<> >();
  18. }