Ravenspoint, you were right, I just misused bundle properties.
Here is my code, which works now :)
#ifndef GRAPH_DEFINITION_H
#define GRAPH_DEFINITION_H
#include <boost/graph/adjacency_list.hpp>
#include "matchedword.h"
struct VertexProperties {
public :
MatchedWord* matchedWord;
};
struct EdgeProperties
{
int distance;
EdgeProperties() : distance(0) {}
EdgeProperties(int d) : distance(d) {}
};
struct GraphProperties {
};
typedef boost::adjacency_list<
boost::vecS, boost::vecS, boost::undirectedS,
VertexProperties,
EdgeProperties,
GraphProperties
> Graph;
typedef boost::graph_traits<Graph>::vertex_descriptor vertex_t;
typedef boost::graph_traits<Graph>::edge_descriptor edge_t;
#endif // GRAPH_DEFINITION_H
The called function (maybe I'll rework the definition later) is:
void GraphManager::addToGraph(VertexProperties node){
vertex_t v = boost::add_vertex(graph);
graph[v].matchedWord = node.matchedWord;
}
Thanks for your answers all !