Say I have the following struct and object definitions:

struct Test1(T)
{
    static if (???)
    {
        void doSomething()
        {
            writeln(typeof(this).stringof);
        }
    }

    T t;
}

class Test2(T)
{
    static if (???)
    {
        void doSomething()
        {
            writeln(typeof(this).stringof);
        }
    }

    T t;
}

const(Test1!int) t1i;
shared(Test2!int) t2s;

How can I tell at the points marked in the above code if the class or struct instance was declared as const, shared, etc.? Is this possible?

Reply via email to