Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.qualifier
Const and Immutable qualifiers helpers for Mir Type System.
License:
Authors:
Ilia Ki
- template
LightScopeOf
(T) - template
LightConstOf
(T)
templateLightImmutableOf
(T) - ref auto
lightScope
(T)(auto return ref scope Tv
)
if (!is(T : P*, P) && __traits(hasMember, T, "lightScope
"));
ref autolightScope
(T)(auto return ref Tv
)
if (!is(T : P*, P) && !__traits(hasMember, T, "lightScope
"));
autolightScope
(T)(return Tv
)
if (is(T : P*, P)); - Tries to strip a reference counting handles from the value. This funciton should be used only when the result never skips the current scope.This function is used by some algorithms to optimise work with reference counted types.
- auto
lightImmutable
(T)(auto immutable ref Tv
)
if (!is(T : P*, P) && __traits(hasMember, immutable(T), "lightImmutable
"));
TlightImmutable
(T)(auto immutable ref Te
)
if (!isDynamicArray!T && isImplicitlyConvertible!(immutable(T), T) && !__traits(hasMember, immutable(T), "lightImmutable
"));
autolightImmutable
(T)(immutable(T)[]e
);
autolightImmutable
(T)(immutable(T)*e
); - auto
lightConst
(T)(auto const ref Tv
)
if (!is(T : P*, P) && __traits(hasMember, const(T), "lightConst
"));
autolightConst
(T)(auto immutable ref Tv
)
if (!is(T : P*, P) && __traits(hasMember, immutable(T), "lightConst
"));
TlightConst
(T)(auto const ref Te
)
if (!isDynamicArray!T && isImplicitlyConvertible!(const(T), T) && !__traits(hasMember, const(T), "lightConst
"));
TlightConst
(T)(auto immutable ref Te
)
if (!isDynamicArray!T && isImplicitlyConvertible!(immutable(T), T) && !__traits(hasMember, immutable(T), "lightConst
"));
autolightConst
(T)(const(T)[]e
);
autolightConst
(T)(immutable(T)[]e
);
autolightConst
(T)(const(T)*e
);
autolightConst
(T)(immutable(T)*e
); - @trusted auto
trustedImmutable
(T)(auto const ref Te
);
Copyright © 2016-2023 by Ilya Yaroshenko | Page generated by
Ddoc on Mon Nov 6 15:24:34 2023