• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 #include <boost/config.hpp>
11 
12 #ifdef BOOST_MSVC
13 // Without disabling this we get hard errors about initialialized pointers:
14 #pragma warning(disable : 4703)
15 #endif
16 
17 #include <boost/graph/graph_concepts.hpp>
18 #include <boost/graph/graph_archetypes.hpp>
19 #include <boost/graph/stanford_graph.hpp>
20 #include <boost/concept/assert.hpp>
21 
main(int,char * [])22 int main(int, char*[])
23 {
24     using namespace boost;
25     // Check Stanford GraphBase Graph
26     {
27         typedef Graph* Graph;
28         typedef graph_traits< Graph >::vertex_descriptor Vertex;
29         typedef graph_traits< Graph >::edge_descriptor Edge;
30         BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
31         BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< Graph >));
32         BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< Graph >));
33         BOOST_CONCEPT_ASSERT(
34             (PropertyGraphConcept< Graph, Edge, edge_length_t >));
35         BOOST_CONCEPT_ASSERT(
36             (PropertyGraphConcept< Graph, Vertex, u_property< Vertex > >));
37         BOOST_CONCEPT_ASSERT(
38             (PropertyGraphConcept< Graph, Edge, a_property< Vertex > >));
39     }
40     {
41         typedef const Graph* Graph;
42         typedef graph_traits< Graph >::vertex_descriptor Vertex;
43         typedef graph_traits< Graph >::edge_descriptor Edge;
44         BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
45         BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< Graph >));
46         BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< Graph >));
47         BOOST_CONCEPT_ASSERT(
48             (ReadablePropertyGraphConcept< Graph, Edge, edge_length_t >));
49         BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept< Graph, Vertex,
50             u_property< Vertex > >));
51         BOOST_CONCEPT_ASSERT((
52             ReadablePropertyGraphConcept< Graph, Edge, a_property< Vertex > >));
53     }
54     return 0;
55 }
56