Skip to content

CXXGraph::Node::getData() should not be const #438

Open
@nolankramer

Description

@nolankramer

The current function signature of CXXGraph::Node::getData() is:

template <typename T>
const T &Node<T>::getData() const {
  return data;
}

This prevents users from modifying their stored data without const_cast. We should remove the qualifiers from this function. If the user wants read-only data, they should make the entire graph const.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:MediumPriority Label for medium priority issuecoresomething about coreenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions