Ticket #3523: test.cc

File test.cc, 655 bytes (added by J.-B. Mouret / Mandor <mouret@…>, 13 years ago)

This programs compiles with boost 1.38 but not with boost 1.40

Line 
1#include <boost/graph/adjacency_list.hpp>
2#include <boost/property_map/dynamic_property_map.hpp>
3
4struct N1 { std::string _id; };
5struct N2 : public N1 {};
6struct C {};
7
8template<typename N>
9struct MyClass
10{
11 typedef boost::adjacency_list<boost::listS, boost::listS,
12 boost::bidirectionalS,
13 N, C> graph_t;
14 void test()
15 {
16 boost::dynamic_properties dp;
17 graph_t g;
18 dp.property("node_id", get(&N::_id, g));
19 }
20};
21
22// this main compiles with boost 1.38 and boost 1.40
23// int main()
24// {
25// MyClass<N1> a;
26// a.test();
27// }
28
29// this ones compiles with boost 1.38 but not with boost 1.40
30int main()
31{
32 MyClass<N2> a;
33 a.test();
34}