
public import __primitives__.(Static);



//
// Static? predicate
//

Static?(x) = false;
[T] overload Static?(static T) = true;



//
// constructors, moveUnsafe, resetUnsafe, destroy
//

[A]
inline overload Static[A]() --> returned:Static[A] {
}

[A]
inline overload Static[A](src:Static[A]) --> returned:Static[A] {
}

[A]
inline overload moveUnsafe(src:Static[A]) --> returned:Static[A] {
}



//
// equals?, lesser?
//

[A, B]
inline overload equals?(a:Static[A], b:Static[B]) = false;

[A]
inline overload equals?(a:Static[A], b:Static[A]) = true;

[A]
inline overload lesser?(a:Static[A], b:Static[A]) = false;



//
// wrapStatic, unwrapStatic
//

alias wrapStatic(x) {
    return Static[x]();
}

[A]
inline unwrapStatic(static A) = A;



//
// call
//

[F, ..AA | CallDefined?(F, ..AA)]
inline overload call(static F, forward ..args:AA) =
    forward ..F(..args);



//
// fieldRef
//

[Module, Ident]
inline overload fieldRef(static Module, static Ident) =
    forward staticFieldRef(Module, Ident);
