Closed ryanmrichard closed 4 years ago
Also need to make sure that something like:
cpp_member(ctor MyClass)
function("${ctor}" _c_this)
# Intent is to bootstrap by calling bases' ctors
BaseClass1(CTOR "${_c_this}")
BaseClass2(CTOR "${_c_this}")
endfunction()
will work. Currently this will lead to infinite recursion because BaseClass1(CTOR ...)
will call the function we are defining and not BaseClass1
's ctor. Assuming that is corrected there still exists the very likely scenario in which BaseClass2
's ctor will overwrite, instead of add to, the state prepared by BaseClass1
's ctor.
Right now objects have to rely on the default ctor, we should register this ctor with the
Object
class instance like we doequal
andserialize
so that derived classes can overload and override the ctor as well. We'll also need an easier way to call a base class's implementation because we usually want to bootstrap ctors.