Skip to content

Confusing function signature of dfs, bfs searches #246

@TonyXiang8787

Description

@TonyXiang8787

In the documentation of (for example) depth first search. The signature of the named parameter version requires a lvalue mutable reference graph.

// named parameter version
template <class Graph, class class P, class T, class R>
void depth_first_search(Graph& G,
  const bgl_named_params<P, T, R>& params);

Also in the documentation below it requires a non-const lvalue. However, if I read the actual code signature, it is acutally const Graph&. This is confusing. The same confusion also appears in the documentation of undirected_dfs, breath first search, and the dfs/bfs visit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    algorithmtype of issue related to algorithmsdocs

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions