Hi,
I'm in the process of upgrading from boost 1.48 to 1.54.
We're using MSVC10.
Most stuff that comes up is easy to fix, but this one gives me
headaches:
...boost\boost_1_54_0\boost/pending/property.hpp(108): error C2752:
'boost::lookup_one_property_internal' : more than one
partial specialization matches the template argument list
with
[
PList=boost::propertyboost::edge_bundle_t,EdgeData,
PropName=boost::edge_bundle_t
]
...boost\boost_1_54_0\boost/pending/property.hpp(114): could be
'boost::lookup_one_property_internal,Tag>'
...boost\boost_1_54_0\boost/pending/property.hpp(108): or
'boost::lookup_one_property_internal,boost::edge_bundle_t>'
...boost\boost_1_54_0\boost/pending/property.hpp(108): or
'boost::lookup_one_property_internal'
...boost\boost_1_54_0\boost/pending/property.hpp(158) : see reference
to class template instantiation
'boost::lookup_one_property_internal' being compiled
with
[
PList=boost::propertyboost::edge_bundle_t,EdgeData>,
PropName=boost::edge_bundle_t
]
...boost\boost_1_54_0\boost/graph/detail/adjacency_list.hpp(1505) :
see reference to class template instantiation
'boost::lookup_one_property' being compiled
with
[
T=boost::propertyboost::edge_bundle_t,EdgeData>,
Tag=boost::edge_bundle_t
]
...boost\boost_1_54_0\boost/graph/detail/adjacency_list.hpp(2028) :
see reference to class template instantiation
'boost::adj_list_helper' being compiled
with
[
Config=boost::detail::adj_list_genboost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::no_property,boost::listS>::config,
Base=boost::undirected_graph_helperboost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::no_property,boost::listS>::config>
]
...boost\boost_1_54_0\boost/graph/adjacency_list.hpp(267) : see
reference to class template instantiation
'boost::vec_adj_list_impl' being compiled
with
[
Graph=boost::adjacency_listboost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,
Config=boost::detail::adj_list_genboost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::no_property,boost::listS>::config,
Base=boost::undirected_graph_helperboost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::vecS,boost::vecS,boost::undirectedS,VertexProps,EdgeProps,boost::no_property,boost::listS>::config>
]
..\graph_problem.cpp(52) : see reference to class template
instantiation
'boost::adjacency_list' being compiled
with
[
OutEdgeListS=boost::vecS,
VertexListS=boost::vecS,
DirectedS=boost::undirectedS,
VertexProperty=VertexProps,
EdgeProperty=EdgeProps
]
...boost\boost_1_54_0\boost/graph/adjacency_list.hpp(374): error C2182:
'[]' : illegal use of type 'void'
The code to reproduce is here:
// boost
#include
#include
#include
class EDGE {};
//////////////////////////////////////////////////////////////////////////
/// graph's vertex data
struct VertexData
{
/// c-tor
VertexData() { pos[0] = 0.0; pos[1] = 0.0;
pos[2] = 0.0; }
VertexData(const double* _pos) { pos[0] = _pos[0]; pos[1] = _pos[1];
pos[2] = _pos[2]; }
/// data
double pos[3];
};
//////////////////////////////////////////////////////////////////////////
/// graph's edge data
struct EdgeData
{
/// c-tor
EdgeData() : pEdge(NULL) {}
EdgeData(EDGE* _pEdge) : pEdge(_pEdge) {}
/// comparison for equality
bool operator==(const EdgeData& dst) const
{
return pEdge == dst.pEdge;
}
/// data
EDGE* pEdge;
};
//////////////////////////////////////////////////////////////////////////
/// types
typedef VertexData VertexProps; ///< custom vertex
properties
typedef boost::property > EdgeProps; ///<
custom edge properties
typedef boost::adjacency_list Type; ///< custom graph type
//////////////////////////////////////////////////////////////////////////
/// unary predicate for testing if edge has duplicates in graph
struct CheckDuplicateEdge
{
CheckDuplicateEdge(const Type& _g) : g(_g) {}
// check if this edge has duplicates
bool operator()(const Type::edge_descriptor& e) const
{
// do something
return false;
}
private:
const Type& g;
};
//////////////////////////////////////////////////////////////////////////
void RemoveDuplicateEdges(Type& g)
{
remove_edge_if(CheckDuplicateEdge(g), g);
}
//////////////////////////////////////////////////////////////////////////
void main()
{
std::cout << "hello graph";
}
//////////////////////////////////////////////////////////////////////////
I have tried to find a solution, and have searched the internet for
hours.
So, hopefully anybody here saw something similar, and solved it
already.
Rgds
Richard