Ctor.
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.
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.