We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in stl, there are both checked and unchecked method to access the value from container
vector[0]; // unchecked, may UB vector.at(1); // checked, may throw map["key1"]; // auto add missing key map.at("key2"); // checked, may throw
graph as a container, however, does not provide a checked method to access the vertex/edge property using vertex/edge id
graph[vertex_id]; // unchecked, may UB graph[edge_id]; // unchecked, may UB
How about providing a checked access method that throw exception in case of missing id. Also helps to keep the API consist with STL containers
graph.at(vertex_id); // unchecked, may throw graph.at(edge_id); // unchecked, may throw
and in general, not sure if I missed it but could not find API to check if the id is valid or not:
graph.contains(vertex_id); // not sure if it exists
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in stl, there are both checked and unchecked method to access the value from container
graph as a container, however, does not provide a checked method to access the vertex/edge property using vertex/edge id
How about providing a checked access method that throw exception in case of missing id. Also helps to keep the API consist with STL containers
and in general, not sure if I missed it but could not find API to check if the id is valid or not:
graph.contains(vertex_id); // not sure if it exists
The text was updated successfully, but these errors were encountered: