-
Notifications
You must be signed in to change notification settings - Fork 15
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
SimpleNode: convenience builder functions #704
Conversation
I would have preferred different argumet ordering for the convenience function, i.e.: but variadic template arguments must be last, and there are only hacky ways using lots of template magic to have it otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few rough corners that do not make sense to me, as well as some minor nitpicks that I do not expect to be fixed if you do not want to.
3b8982c
to
7be2356
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally fine to me. One final thought: Would it be possible to move these functions into the SimpleNode class instead of having them as free standing functions?
Usage would then be something like this: SimpleNode::CreateOpNode<>(....)
I also do not particularly like the name CreateOpNode
, but I guess a simple Create()
or CreateNode()
won't work as it would clash with the others already being there.
7be2356
to
3048b62
Compare
I would actually prefer free functions, I would prefer if everything in the nodes is concerned with their properties and access, but this convenience helper actually crosses "operator" and "node" so it is not exactly clear where it belongs to. |
3048b62
to
a8a507a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually prefer free functions, I would prefer if everything in the nodes is concerned with their properties and access, but this convenience helper actually crosses "operator" and "node" so it is not exactly clear where it belongs to.
Fair point.
a8a507a
to
aa8b00d
Compare
Add constructor as well as helper function to create simple and its operator in a single call. Allow to move the created operator in (instead of copying it).
aa8b00d
to
69028cb
Compare
Add constructor as well as helper function to create simple and its operator in a single call. Allow to move the created operator in (instead of copying it).