graph-v2
graph-v2 copied to clipboard
`size(bfs)` is misleading and breaks the range interface
All the breadth-first (and probably other) views bfs expose function size(bfs) which does not return the number of elements in the represented input range.
static_assert(std::ranges::sized_range<decltype(bfs)>); returns true. std::ranges::distance(bfs) compiles returns a number, but it is not the range size.
This makes the ranges interface break.
I am not sure how useful it is for the users to know how many elements are stored in the internal queue. But if it is, the library should use a different name, such as bfs.queue_size().