Subject: [Boost-bugs] [Boost C++ Libraries] #7507: BGL subgraph copy constructor buggy
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-15 14:45:45
#7507: BGL subgraph copy constructor buggy
------------------------------------------------------+---------------------
Reporter: Amyn Bennamane <amynbe@â¦> | Owner: jewillco
Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost 1.51.0 | Severity: Problem
Keywords: copy-on-write, subgraph copy constructor |
------------------------------------------------------+---------------------
Hello,
I store subgraph objects in a std::list.
After this, most of the data contained in subgraphs are lost.
Attached is a minimalist code that creates a root graph and two childen,
and then displays them directly, then insert them into a (copy-on-write)
list, then displays them again.
The root redisplays too much, and children lose data.
I am on MacOSX with gcc 6; maybe on other platforms the copy would not
happen, since I don't modify the graphs between insertion and display.
Here is my output:
{{{
From the stack:
(root) graph: 6(0,2) 4(1,2)
num_edges= 2
subgraph: 0(0,1)
num_edges= 1
subgraph: 0(0,1)
num_edges= 1
From list:
graph: 0(0,1) 1(1,2) 2(1,3) 6(2,5) 3(4,1) 4(4,5) 5(5,3)
num_edges= 7
graph:
num_edges= 0
graph:
num_edges= 0
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7507> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC