-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
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
Add generic addNode
and addEdge
overloads
#361
Comments
I don't think forcing users to upgrade their version of the C++ standard is necessarily a good thing. Supporting new features from the standard is fine as long as it's hidden in the library - but if it's in the headers it becomes a far more troublesome problem. Having the maximum amount of backwards compatibility is a good thing. Most library implementers should strive for that. This being said, the template variadic list is a neat idea. |
I think we should discuss and consider the possibility of distributing a standard hpp/cpp library, as the drawbacks of header-only are starting to manifest in this library. |
This SO article goes over some of the basic points: https://softwareengineering.stackexchange.com/questions/305618/are-header-only-libraries-more-efficient I do think the low administrative costs of a header-only library make it attractive to keep. |
I think we can open a discussion in discussion section. |
I Agree with @nrkramer |
If you think that it would be a useful addition we could still implement the new method without using the C++20 |
In this way, I think is good! |
I was thinking that it might be nice to add overloads for the
addNode
andaddEdge
methods that take an arbitrary number of nodes or edges.This could be done with something like:
and in addition it would be nice to define a type trait that makes sure that the template parameter is in fact a node/edge, like:
so that the complete function declaration becomes:
This might be an overkill but I think that it could be a useful addition;
What do you think @ZigRazor @nrkramer?
P.S. the use of
requires
needs C++20, but considering issue #266 I suppose that there was already the intention of updating the standard version.The text was updated successfully, but these errors were encountered: