formatQualifiers

Undocumented in source. Be warned that the author may not have intended to support it.
string
formatQualifiers
()
()

Examples

class A
{
    int a;
    int make() const shared @property
    {
        return a;
    }

    int makePure() inout pure @safe
    {
        return a;
    }

    int makeImut() immutable nothrow @trusted
    {
        return a;
    }

    ref int makeRef()
    {
        return a;
    }
}

auto aimut = new immutable(A);
auto aconst = new const shared(A);
auto amut = new A;
//  assert(qualifiers!(aimut.makeImut)().sort().array() == [Qual!"immutable", Qual!"nothrow", Qual!"@trusted"].sort);
//  assert(qualifiers!(aconst.makePure)().sort().array() == [Qual!"@safe", Qual!"inout", Qual!"pure"].sort);
//  assert(qualifiers!(aconst.make)().sort().array() == [Qual!"@property", Qual!"@system", Qual!"const", Qual!"shared"].sort);
assert(qualifiers!(amut.makeRef)().sort().array() == [Qual!"@system", Qual!"ref"]);
//  assert(qualifierMatch!(aconst.make).matches([Qual!"@property", Qual!"@system", Qual!"const", Qual!"shared"].sort));
//  assert(!qualifierMatch!(aconst.make).matches([Qual!"@property", Qual!"@system", Qual!"shared"].sort));
//  assert(!qualifierMatch!(aconst.make).matches([Qual!"@property", Qual!"ref", Qual!"@system", Qual!"shared"].sort));
//  assert(!qualifierMatch!(aconst.make).matches(["property", Qual!"@system", Qual!"shared"].sort));

Meta