Quicktype's use of shared_ptrs in C++ #2018
Unanswered
SimonCahill
asked this question in
Q&A
Replies: 2 comments 12 replies
-
We actually don't know C++ very well. This code was a contribution. I believe these types are used to add nullability when a primitive value could be missing. |
Beta Was this translation helpful? Give feedback.
3 replies
-
I had a pull request running with a fix for this and it just disappeared? @dvdsgl You just wrong a few minutes ago that you liked it. Did you accidently delete it? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the reasoning behind using
shared_ptr<T>
when Quicktype generates C++ classes, especially for primitive types.It complicates things unnecessarily when simply exchanging primitive data types, such as integers or floating-point numbers.
If I need to cache the variables in my data structures so I can pass them to Quicktype's output, there's no need for using Quicktype at all and I can just as easily design my own header/class which respects my requirements.
Beta Was this translation helpful? Give feedback.
All reactions