Guten Tag Robert Middleton, am Samstag, 6. November 2021 um 16:52 schrieben Sie:
> Unfortunately not, for the reasons above. Since the parent class only > holds a single pointer to the private data, whatever data is stored > must be a subclass of the parent's private data. So we must cast it > to whatever class's private data that we are currently using. Understood, but does it really needs to be a macro? Why not use a method implementing the cast which can then be overridden by subclasses as necessary? Looks like a covariant return type to me, doesn't it? https://en.wikipedia.org/wiki/Covariant_return_type Mit freundlichen Grüßen Thorsten Schöning -- AM-SoFT IT-Service - Bitstore Hameln GmbH Mitglied der Bitstore Gruppe - Ihr Full-Service-Dienstleister für IT und TK E-Mail: [email protected] Web: http://www.AM-SoFT.de/ Tel: 05151- 9468- 0 Tel: 05151- 9468-55 Fax: 05151- 9468-88 Mobil: 0178-8 9468-04 AM-SoFT IT-Service - Bitstore Hameln GmbH, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 221853 - Geschäftsführer: Janine Galonska
