title: copying edges with adjacent vertices and their properties using BOOST
body: <p>I'm trying to copy an edge from a graph and add it to another (with all his vertices and properties), I make something like:</p>
  
  <pre><code>if (!dataG.empty()) 
      {
          auto const&amp; gr = dataG.front(); // firslt graph in G_list
  
  
          auto ep = edges(gr).first;  //first edge in gr
  
              vertex_t from = source(*ep, gr);
          vertex_t to   = target(*ep, gr);
          boost::property_map&lt;Graph, int VertexProperties::*&gt;::type idmap    = boost::get(&amp;VertexProperties::id, testg);
          boost::property_map&lt;Graph, int VertexProperties::*&gt;::type labelmap = boost::get(&amp;VertexProperties::label, testg);
          idmap[from]    = gr[from].id;
          labelmap[from] = gr[from].label;
          boost::add_vertex(VertexProperties(idmap[from], labelmap[from]), testg);
          idmap[to]    = gr[to].id;
          labelmap[to] = gr[to].label;
          boost::add_vertex(VertexProperties(idmap[to], labelmap[to]), testg);
  
  
          boost::add_edge(from, to, gr[*ep], testg);    
      }
  </code></pre>
  
  <p>and I  got this error:</p>
  
  <pre><code>segmentation error core dumped
  </code></pre>
  
  <p>The full source is here <a href="http://pastebin.com/vzCDbTiB" rel="nofollow">http://pastebin.com/vzCDbTiB</a></p>
  
  <p>Sample input: <a href="http://pastebin.com/g4cgaHJB" rel="nofollow">http://pastebin.com/g4cgaHJB</a></p>