1 // (C) Copyright 2009 Dmitry Bufistov, Andrew Sutton
2 //
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0 (See accompanying file
5 // LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7 #include <boost/graph/graph_concepts.hpp>
8 #include <boost/graph/adjacency_list.hpp>
9 #include <boost/concept/assert.hpp>
10
11 // Test contributed by Dmitry that validates a read-only property map bug
12 // for bundled properties.
13 // TODO: Integrate this into a testing framework.
14
15 using namespace boost;
16
17 struct EdgeProp
18 {
19 double weight;
20 };
21
22 typedef adjacency_list< vecS, vecS, directedS, no_property, EdgeProp > graph_t;
main()23 int main()
24 {
25 typedef property_map< graph_t, double EdgeProp::* >::type WeightMap;
26 typedef property_map< graph_t, double EdgeProp::* >::const_type cWeightMap;
27 typedef graph_traits< graph_t >::edge_descriptor Edge;
28 BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept< WeightMap, Edge >));
29 BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept< cWeightMap, Edge >));
30 return 0;
31 }
32