Any way to tell if an object is inside another class?
Paul Backus
snarwin at gmail.com
Mon Sep 28 14:09:07 UTC 2020
On Monday, 28 September 2020 at 13:45:30 UTC, Ruby The Roobster
wrote:
> On Monday, 28 September 2020 at 13:00:43 UTC, Paul Backus wrote:
>
>> 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.
>
> Okay. Here is an example.
> class Test {
> this.is_in_aggregate
> }
>
> I want a function that returns true when the parent object is a
> member variable of an aggregate type(UDA)
Can you re-write this as actual valid D code, but with the
implementation of the function stubbed out? I still don't
understand what your function is supposed to take as its
input(s), or what "parent object is a member variable of an
aggregate type" means (as far as I'm aware, objects are *values*,
not *variables*), or what UDAs have to do with any of this.
More information about the Digitalmars-d-learn
mailing list