Opened 13 years ago

Closed 13 years ago

#3917 closed Bugs (fixed)

Bug - astar_search requires vertex_descriptor to convert to size_t

Reported by: Andy Tompkins Owned by: Andrew Sutton
Milestone: Boost 1.43.0 Component: graph
Version: Boost 1.42.0 Severity: Problem
Keywords: graph astar_search Cc:

Description

Calling astar_search with a graph where the vertex_descriptor is not convertable to size_t fails to compile.

The problem is in boost/graph/astar_search.hpp, function astar_search_no_init where the IndexInHeapMap needs to know about the VertexIndexMap. Without it, index_in_heap is passed a vertex_descriptor but is expecting a size_t and put(index_in_heap, v, index) fails to compile.

I have attached a small program to produce the error and a patch file to correct it.

Attachments (2)

TestGraph.cpp (4.2 KB ) - added by Andy Tompkins 13 years ago.
Test to reproduce the compile error
astar_search.patch (569 bytes ) - added by Andy Tompkins 13 years ago.
Patch to correct the problem.

Download all attachments as: .zip

Change History (3)

by Andy Tompkins, 13 years ago

Attachment: TestGraph.cpp added

Test to reproduce the compile error

by Andy Tompkins, 13 years ago

Attachment: astar_search.patch added

Patch to correct the problem.

comment:1 by Jeremiah Willcock, 13 years ago

Resolution: fixed
Status: newclosed

(In [59628]) Applied patch from Andy Tompkins in #3917; fixes #3917

Note: See TracTickets for help on using tickets.