I apologise if this was mentioned in a previous episode but is there a reason you're not using std::variant?
@PaperzlelАй бұрын
Fair question! I didn't really express this in any video, so I'm making a note of this for the next one. The reason is that we want to control what our Variant class can do, since we can't update the C++ standard library like we can our own code. Plus, it's nice to give an example of how we'd create such a class for people to maybe learn a thing or two :)
@giffiytАй бұрын
I've only had a glance at the godot's source and still recognized the similarity... This is pretty much 1:1 copy of the godot's variant type with some stuff removed. I've written variant's like this before, it's not rocket science.