stanford_graph_cc.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //=======================================================================
  2. // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
  3. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //=======================================================================
  9. #include <boost/config.hpp>
  10. #ifdef BOOST_MSVC
  11. // Without disabling this we get hard errors about initialialized pointers:
  12. #pragma warning(disable:4703)
  13. #endif
  14. #include <boost/graph/graph_concepts.hpp>
  15. #include <boost/graph/graph_archetypes.hpp>
  16. #include <boost/graph/stanford_graph.hpp>
  17. #include <boost/concept/assert.hpp>
  18. int main(int,char*[])
  19. {
  20. using namespace boost;
  21. // Check Stanford GraphBase Graph
  22. {
  23. typedef Graph* Graph;
  24. typedef graph_traits<Graph>::vertex_descriptor Vertex;
  25. typedef graph_traits<Graph>::edge_descriptor Edge;
  26. BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
  27. BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
  28. BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
  29. BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Edge, edge_length_t > ));
  30. BOOST_CONCEPT_ASSERT((
  31. PropertyGraphConcept<Graph, Vertex, u_property<Vertex> > ));
  32. BOOST_CONCEPT_ASSERT((
  33. PropertyGraphConcept<Graph, Edge, a_property<Vertex> > ));
  34. }
  35. {
  36. typedef const Graph* Graph;
  37. typedef graph_traits<Graph>::vertex_descriptor Vertex;
  38. typedef graph_traits<Graph>::edge_descriptor Edge;
  39. BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
  40. BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
  41. BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
  42. BOOST_CONCEPT_ASSERT((
  43. ReadablePropertyGraphConcept<Graph, Edge, edge_length_t > ));
  44. BOOST_CONCEPT_ASSERT((
  45. ReadablePropertyGraphConcept<Graph, Vertex, u_property<Vertex> > ));
  46. BOOST_CONCEPT_ASSERT((
  47. ReadablePropertyGraphConcept<Graph, Edge, a_property<Vertex> > ));
  48. }
  49. return 0;
  50. }