Follow-up from "Update Entity to expose mergeAndReset method of internal object"
The following discussion from !1253 (merged) should be addressed:
-
@dcraik started a discussion: (+10 comments) Hi @clemenci unfortunately this doesn't work because in the vast majority of cases the
Entity
is created whenMonitoringHub::registerEntity
is called from the constructor of the base classBufferableCounter
- so many incompatibleEntity
objects will share an identicaltypeindex
. Additionally, theEntity
created when aCounter
is constructed will not match thetypeindex
of anEntity
created from exactly the sameCounter
after the fact (when the derived class has finished being constructed).