isLeft

returns true when the Left type is stored

bool
isLeft
(
T : Either!(Left, Right)
Left
Right
)
()

Examples

isLeft is true when the struct is setup with the left type

auto either = Either!(int, bool)(1);

either.isLeft.should.equal(true);

isLeft is false when the struct is setup with the right type

auto either = Either!(int, bool)(true);

either.isLeft.should.equal(false);

Meta