Hi,
i have reduced my problem to the following lines. I want to install a own
edge property to a graph. The property as a template argument with then
name "source". Here is my try:
---> code starts here <---
#include
namespace Foo {
class source
{
};
}
namespace Bar {
template <class Source>
class Edge
{
};
}
typedef Bar::EdgeFoo::source tMyEdge;
struct edge_impl_t {
typedef boost::edge_property_tag kind;
};
typedef boost::property edge_property_t;
typedef boost::adjacency_list < boost::listS,
boost::vecS,
boost::undirectedS,
boost::no_property,
edge_property_t> tGraph;
int main(int /* argc */, char* /* argv[] */)
{
tGraph stGraph1;
tGraph stGraph2;
stGraph1 = stGraph2;
}
----> code ends here <---
When compiling the above code with gcc 4.1.1, i get these errors:
main.cpp: In member function 'void boost::vec_adj_list_impl::copy_impl(const boost::vec_adj_list_impl&)
[with Graph = boost::adjacency_listFoo::source, boost::no_property>, boost::no_property,
boost::listS>, Config =
boost::detail::adj_list_genFoo::source, boost::no_property>,
boost::no_property, boost::listS>, boost::vecS, boost::listS,
boost::undirectedS, boost::no_property, boost::propertyFoo::source, boost::no_property>, boost::no_property,
boost::listS>::config, Base =
boost::undirected_graph_helperFoo::source, boost::no_property>,
boost::no_property, boost::listS>, boost::vecS, boost::listS,
boost::undirectedS, boost::no_property, boost::propertyFoo::source, boost::no_property>, boost::no_property,
boost::listS>::config>]':
/usr/local/gcc-4.1.1/boost-1.33.1/boost/graph/detail/adjacency_list.hpp:1990:
instantiated from 'boost::vec_adj_list_impl&
boost::vec_adj_list_impl::operator=(const
boost::vec_adj_list_impl&) [with Graph =
boost::adjacency_listFoo::source,
boost::no_property>, boost::no_property, boost::listS>, Config =
boost::detail::adj_list_genFoo::source, boost::no_property>,
boost::no_property, boost::listS>, boost::vecS, boost::listS,
boost::undirectedS, boost::no_property, boost::propertyFoo::source, boost::no_property>, boost::no_property,
boost::listS>::config, Base =
boost::undirected_graph_helperFoo::source, boost::no_property>,
boost::no_property, boost::listS>, boost::vecS, boost::listS,
boost::undirectedS, boost::no_property, boost::propertyFoo::source, boost::no_property>, boost::no_property,
boost::listS>::config>]'
/usr/local/gcc-4.1.1/boost-1.33.1/boost/graph/adjacency_list.hpp:373:
instantiated from 'boost::adjacency_list&
boost::adjacency_list::operator=(const
boost::adjacency_list&) [with OutEdgeListS =
boost::listS, VertexListS = boost::vecS, DirectedS = boost::undirectedS,
VertexProperty = boost::no_property, EdgeProperty =
boost::propertyFoo::source, boost::no_property>,
GraphProperty = boost::no_property, EdgeListS = boost::listS]'
main.cpp:42: instantiated from here
main.cpp:7: error: 'class Foo::source' is not a function,
/usr/local/gcc-4.1.1/boost-1.33.1/boost/graph/adjacency_list.hpp:464: error:
conflict with 'template Vertex
boost::source(const boost::detail::edge_base&, const
boost::adjacency_list&)'
/usr/local/gcc-4.1.1/boost-1.33.1/boost/graph/detail/adjacency_list.hpp:2051:
error: in call to 'source'
I know the easiest way is to rename Foo::source but this class came from
another library. Is there a chance to use this class anyway?
Thanks in advance,
Lars