copy.cpp 657 B

12345678910111213141516171819202122232425
  1. // Copyright (C) Vladimir Prus 2003.
  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/adjacency_list.hpp>
  6. #include <boost/graph/copy.hpp>
  7. using namespace boost;
  8. class copier {
  9. public:
  10. template<class V1, class V2>
  11. void operator()(const V1&, const V2&) const {}
  12. };
  13. int main()
  14. {
  15. adjacency_list<vecS, vecS, directedS, property<vertex_root_t, int> > g1, g2;
  16. adjacency_list<vecS, setS, directedS, property<vertex_index_t, int> > g3;
  17. copy_graph(g1, g2);
  18. copier c;
  19. copy_graph(g3, g1, vertex_copy(c));
  20. }