BoxedBool

Boxed boolean value.

When using this class alone, always use <object>.getValue to avoid the null-reference check.

When the class is used as a boolean argument, the AliasThis kicks in.

class BoxedBool : Boxed!bool {}

Constructors

this
this(bool value)

Ctor.

Members

Mixins

__anonymous
mixin BoxedAlias
Undocumented in source.

Examples

BoxedBool bb = new BoxedBool(false);

void testFalse(bool value)
{
    assert(!value);
}

if (bb) // null-reference check, it will always fail. Use bb.getValue in this case.
{
    assert(false);
}
else
{
    assert(true);
}

testFalse(bb); // bb is treated as a bool, it won't fail this way.

Meta