[Boost.graph] compilation error for dijkstra_shortest_paths

Hello all, I have developed an application using the dijkstra_shortest_paths function of the Graph library of version 1.31 of Boost. When upgrading to Boost version 1.34, I have the following compilation error under Borland C++ Builder 6: [C++ Error] relaxed_heap.hpp(52): E2247'relaxed_heap<unsigned int, indirect_cmp<float*,less<float>>,vec_adj_list_vertex_id_map<VertexProperty, unsigned int>>::largest_key' is not accessible If I comment the call to the "dijkstra_shortest_paths" function in my code, there is no compilation error anymore. Is it related to how the default vertex_index is defined? If I add and use a custom vertex_index in the vertex property map, I get the same compilation error. I have tried to compile with version 1.33 and add the same error. I defined my graph as follow: struct vertex_altitude_t {typedef vertex_property_tag kind;}; typedef property<vertex_altitude_t, float> VertexProperty; typedef property<edge_weight_t, float > EdgeProperty; typedef adjacency_list<vecS, vecS, undirectedS, VertexProperty, EdgeProperty> Graph; Any help would be greatly appreciated, thank you very much, nicolas

On Mon, 2007-05-28 at 12:37 +0000, Nicolas Ray wrote:
Hello all,
I have developed an application using the dijkstra_shortest_paths function of the Graph library of version 1.31 of Boost. When upgrading to Boost version 1.34, I have the following compilation error under Borland C++ Builder 6:
[C++ Error] relaxed_heap.hpp(52): E2247'relaxed_heap<unsigned int, indirect_cmp<float*,less<float>>,vec_adj_list_vertex_id_map<VertexProperty, unsigned int>>::largest_key' is not accessible
Oops, this looks like a bug in the relaxed_heap code. Please add friend struct group; at line 88 of relaxed_heap.hpp (right after the definition of the "group" struct), which should fix the problem. - Doug

Douglas Gregor <doug.gregor <at> gmail.com> writes:
On Mon, 2007-05-28 at 12:37 +0000, Nicolas Ray wrote:
Hello all,
I have developed an application using the dijkstra_shortest_paths function of the Graph library of version 1.31 of Boost. When upgrading to Boost version 1.34, I have the following compilation error under Borland C++ Builder 6:
[C++ Error] relaxed_heap.hpp(52): E2247'relaxed_heap<unsigned int, indirect_cmp<float*,less<float>>,vec_adj_list_vertex_id_map<VertexProperty, unsigned int>>::largest_key' is not accessible
Oops, this looks like a bug in the relaxed_heap code. Please add
friend struct group;
at line 88 of relaxed_heap.hpp (right after the definition of the "group" struct), which should fix the problem.
- Doug
Doug, thanks for your answer. The compilation error disappeared after the change you suggested, but another one appeared further down in relaxed_heap.hpp. The compilation error is now: [C++ Error] relaxed_heap.hpp(221): E2094 'operator&&' not implemented in type 'optional<unsigned int>' for arguments of type 'bool' and is related to the line 218 (in the original file): if (groups[i] && (!x->value || compare(*groups[i], *x->value))) { nicolas
participants (2)
-
Douglas Gregor
-
Nicolas Ray