Skip to content

Node creation bug where implicit conversion happens between type std::string and double #449

@badumbatish

Description

@badumbatish

Describe the bug
The bug happens where user writes

CXXGraph::Node<std::string> node = CXXGraph::Node<std::string>("id", 0);

The library accepts this as valid and it will pass compile time. But then when it times to run the actual code, this happens:

[2]    43987 segmentation fault  ./build/standalone/anon

I suggest adding the explicit keyword to avoid conversion from double to std::string

This happens when user's IDE might not warn them that there is an implicit conversion and since they thought that templated type std::string is for the first parameter.

Metadata

Metadata

Assignees

Labels

Priority:CriticalPriority Label for Critical IssuebugSomething isn't workingcoresomething about coregood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions