$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: ksaleh2
Date: 2002-12-07 12:14:32
I'm trying boost for the first time on Codewarrior 8.0 for windows.
The Boost version is 1.25.1 from the "Boost Graph Library"
accompanying CD. The offensive code is :
#include <boost/config.hpp>
#include <iostream>
#include <boost/graph/adjacency_list.hpp>
using namespace boost;
using namespace std;
int main()
{
typedef adjacency_list<vecS,vecS,directedS,
property < vertex_name_t, char >,property<edge_weight_t,double>
> Graph;
property_map < Graph, vertex_name_t >::type name_map ;
property_map < Graph, edge_weight_t >::type value_map ;
Graph g;
typename graph_traits<Graph>::vertex_descriptor a,b;
a = add_vertex(g); name_map[a] = 'a';
b = add_vertex(g); name_map[b] = 'b';
typename graph_traits<Graph>::edge_descriptor ed;
bool inserted;
tie(ed, inserted) = add_edge(a, b, g);
value_map[ed] = 1.2;
return 0;
}
If the second template parameter for class VertexListS is replaced
with listS it compiles and run normally.
typedef adjacency_list<vecS,listS,directedS,
property < vertex_name_t, char >,property<edge_weight_t,double>
> Graph;
Can you please advise why?
Best Regards