Any way to tell if an object is inside another class?

Paul Backus snarwin at gmail.com
Mon Sep 28 13:00:43 UTC 2020


On Monday, 28 September 2020 at 11:11:13 UTC, Ruby The Roobster 
wrote:
> For example:
>
> class test {}
> class T {
> auto c = new test();
> }
>
> Any way to tell if an object of type test is a member of object 
> T? I don't want to use the name of the member variable. I just 
> want to know if this works in general.

Can you give some examples of inputs and corresponding outputs 
for this, like you would for a unit test? I don't understand 
exactly what you're asking, and it would help clarify.


More information about the Digitalmars-d-learn mailing list