Where are you looking? The line I see (in astar_search_no_init) is:
MutableQueue Q(cost, index_in_heap, compare);
which doesn't require the number of vertices in advance.
The reason is that the normal Boost A* search avoids processing the same vertex twice by using a color map. If you want the implicit graph version that appears in most textbooks, you need a dummy color map that claims that all vertices are unvisited. So it is somewhat a workaround to allow the same algorithm to work for both cases.
Notes :
I use astar_search_no_init, and property maps based on std::map so that put() can index it in a not-known-yet location.
Btw, my color map type is std::map<NodeID,boost::default_color_type > (plus the wrapper around it). I feel that using
"boost::default_color_type" is kind of a hack. Is it ?