-
Couldn't load subscription status.
- Fork 25
Open
Description
The current Graph Container Interface requires the IDs to be copy_constructible.
Suppose that I have my own graph representation that needs to use non-copyable IDs. How am I supposed to customize vertex_id?
ID const& vertex_id(Graph const& g, Graph::const_iterator it) {
return it->first;
}Shall I return by value or by reference to const? If by value, then I need to copy. If by reference, then the CPO vertex_id will do the copying, because its return type is non-reference, and I am returning a reference to const, so even move will not work.
Metadata
Metadata
Assignees
Labels
No labels