Aaron Windsor
On 6/5/07, gast128
wrote: Aaron Windsor
writes: On 6/4/07, gast128
wrote: Dear all,
We want to (DLL) export a boost graph. Probably on (DLL) exporting, the compiler tries to generate code for every member function. However on
VC++7.1
it gives then a problem with operator[]. This can be easily verified
with
the
following case:
void Foo() { boost::adjacency_list<> graph; graph[0]; }
We use here Boost 1.33.0. Anyone an idea?
Wkr, me
Hi,
What are you expecting the expression "graph[0]" to do/return in the code above?
Regards, Aaron
Nothing. It won't compile, complaining about return type. Same error if you try to export an adjacency_list.
Wkr, me
graph[0] accesses the bundled properties for the first vertex in the graph, but you've declared an empty graph with no properties. So, even if you got it to compile by adding some properties to the graph, 0 still isn't even a valid vertex descriptor, since the graph is empty.
Regards, Aaron
But that 's the problem I can't get it compile, even if I don't use an empty
graph, e.g.:
void Foo()
{
boost::adjacency_list<> graph;
boost::adjacency_list<>::vertex_descriptor v = add_vertex(graph);
graph[v];
}
c:\Work Sdk\Boost\boost\graph\adjacency_list.hpp(412) : error
C2440: 'return' : cannot convert
from 'boost::vec_adj_list_any_vertex_pa::bind_