|
Boost Users : |
Subject: [Boost-users] Segmentation fault
From: caligulaemperorofrome_at_[hidden]
Date: 2009-06-20 02:35:23
Trying to use bundled properties like so.
typedef std::string Colour;
struct edge_properties
{
string eName;
set< Colour > Colours;
};
Then the following works OUTSIDE the vis object.
graph_t::edge_descriptor e = *edges(g).first;
g[e].Colours.insert("5ty");
g[e].Colours.insert("6");
g[e].Colours.insert("7");
set<Colour> set(g[e].Colours);
for(std::set<Colour>::iterator
si = set.begin(); si
!= set.end(); si++)
std::cout << *si << " ";
But if I try to use edge property.Colours INSIDE the vis object (using maps or not)
like so.
typedef set< string > Set;
for(colour_iter=Colour.begin(); colour_iter != Colour.end(); ++colour_iter) {
//Set & set = get(m_eColours_map, e);
get(m_eColours_map, e).insert( *colour_iter );
//set.insert( *colour_iter );
//g[e].Colours;
//g[e].Colours.insert("Green");
//g[e].Colours.insert(*colour_iter);
//g[e].Colours.insert("5");
//g[e].Colours.end();
}
It compiles but gives Segmentation fault no matter what I
try.
Im beginning
to think that set< string > will not work inside the vis object.
If thats true I'll have to rewrite a major part of my program, but I hope not.
Using : BOOST_LIB_VERSION "1_36"
Thanks
Caligula
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net