Hi,
I'm using the Boost Graph library to construct a directed graph:
typedef boost::directed_graph<BasicBlock> Graph;
The vertex class, "BasicBlock", is not my own; it comes from the LLVM
project.
Unfortunately, the declaration above causes a slew of compiler errors
(see below) that appear to be related to BasicBlock's copy
constructor. Sure enough, I checked BasicBlock.h, and its copy
constructor is declared private and is not even implemented. There
appears to be some sort of design issue that prevents this class from
having a copy constructor.
Is there some workaround for this on the Boost Graph side, or must
vertex classes always have a copy constructor?
Thanks,
Trevor
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
In constructor ‘boost::property::property(const T&)
[with Tag = boost::vertex_bundle_t, T = llvm::BasicBlock, Base =
boost::no_property]’:
Clepsydra.cpp:46: instantiated from here
/Users/twharmon/Development/LLVM/llvm-2.7/llvm-2.7-src/include/llvm/
BasicBlock.h:81: error: ‘llvm::BasicBlock::BasicBlock(const
llvm::BasicBlock&)’ is private
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
31: error: within this context
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
In copy constructor ‘boost::property::property(const
boost::property&)’:
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
22: instantiated from ‘typename boost::adjacency_list,
boost::property, GraphProp,
boost::listS>::vertex_descriptor boost::directed_graph::add_vertex(const typename
boost::graph_detail::vertex_prop<Prop>::type&) [with VertexProp =
llvm::BasicBlock, EdgeProp = boost::no_property, GraphProp =
boost::no_property]’
/Users/twharmon/Development/boost_1_42_0/boost/graph/
directed_graph.hpp:454: instantiated from ‘typename
boost::directed_graph::vertex_descriptor boost::add_vertex(const typename
boost::directed_graph::vertex_property_type&, boost::directed_graph&)
[with VP = llvm::BasicBlock, EP = boost::no_property, GP =
boost::no_property]’
Clepsydra.cpp:46: instantiated from here
/Users/twharmon/Development/LLVM/llvm-2.7/llvm-2.7-src/include/llvm/
BasicBlock.h:81: error: ‘llvm::BasicBlock::BasicBlock(const
llvm::BasicBlock&)’ is private
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
22: error: within this context
cc1plus: warnings being treated as errors
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
In copy constructor ‘boost::property >::property(const
boost::property >&)’:
/Users/twharmon/Development/boost_1_42_0/boost/pending/property.hpp:
22: warning: synthesized method
‘boost::property::property(const
boost::property&)’ first required here
/Users/twharmon/Development/boost_1_42_0/boost/graph/
directed_graph.hpp: In member function ‘typename
boost::adjacency_list,
boost::property, GraphProp,
boost::listS>::vertex_descriptor boost::directed_graph::add_vertex(const typename
boost::graph_detail::vertex_prop<Prop>::type&) [with VertexProp =
llvm::BasicBlock, EdgeProp = boost::no_property, GraphProp =
boost::no_property]’:
/Users/twharmon/Development/boost_1_42_0/boost/graph/
directed_graph.hpp:154: warning: synthesized method
‘boost::property >::property(const
boost::property >&)’ first required here