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
[master < T1080] overload << operator for mgp::Type #1080
Conversation
3956715
to
5b821e7
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 change that we return "" instead of "type: ", otherwise looks good
@mpintaric55334 there is one other thing I haven't thought about until now. We can support instead of TypeString, operator<< which serves for output: https://learn.microsoft.com/en-us/cpp/standard-library/overloading-the-output-operator-for-your-own-classes?view=msvc-170. This is one example, what do you think? |
@vpavicic will update the docs when I get the green light from Antonio. |
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 good to go
Is this also C++ ? |
Yes, it is |
During writing collections query module, the need to be able to print the mgp::Type was found, so it was solved with this PR.
[master < Task] PR
To keep docs changelog up to date, one more thing to do:
Write a release note here
You are now able to print the type of mgp::Type() using operator << . For example, if you have a mgp::List() list, cout<< list <<endl will output "list".
Tag someone from docs team in the comments