Ticket #11735: main.cpp

File main.cpp, 615 bytes (added by willi+boost@…, 7 years ago)

test case triggering the bug

Line 
1#define _SCL_SECURE_NO_WARNINGS
2
3#include <boost/graph/astar_search.hpp>
4#include <boost/graph/grid_graph.hpp>
5
6using Grid = boost::grid_graph< 2 >;
7using Vertex = boost::graph_traits< Grid >::vertex_descriptor;
8
9struct DijkstraHeuristic : boost::astar_heuristic< Grid, int >
10{
11 int operator()( const Vertex& ) noexcept
12 {
13 return 0;
14 }
15};
16
17int main( int, char** )
18{
19 Grid grid{ { 30u, 1u } };
20 boost::static_property_map< int > weights{ 1 };
21 const Vertex start{ 0u, 0u };
22 boost::astar_search(
23 grid,
24 start,
25 DijkstraHeuristic{},
26 boost::weight_map( weights )
27 );
28 return 0;
29}