$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Segmentation fault
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-20 12:56:18
AMDG
caligulaemperorofrome_at_[hidden] wrote:
> 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.
>   
Maybe a dumb question, but what is 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 );
>   
What is m_eColours_map?
>                 //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"
>   
Could you post a complete compilable example?  It's a little
hard to figure out exactly what you're doing.
In Christ,
Steven Watanabe