Represents a value of one of two possible types (Left
or Right
).
More...
#include <either.hpp>
Public Member Functions | |
Either (const Left &l) | |
Creates an Either that is a Left . | |
Either (const Right &r) | |
Creates an Either that is a Right . | |
bool | isLeft () const throw () |
Check if this is a Left . | |
bool | isRight () const throw () |
Check if this is a Right . | |
Left & | left () |
Get the value of Either if it's a Left . | |
Right & | right () |
Get the value of Either if it's a Right . |
Represents a value of one of two possible types (Left
or Right
).
Definition at line 42 of file either.hpp.
Left& acedia::Either< Left, Right >::left | ( | ) | [inline] |
Get the value of Either if it's a Left
.
ClassCastException | if this is not a left |
Definition at line 78 of file either.hpp.
Right& acedia::Either< Left, Right >::right | ( | ) | [inline] |
Get the value of Either if it's a Right
.
ClassCastException | if this is not a right |
Definition at line 87 of file either.hpp.