![]() |
LeechCraft
0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
|
#include "either.h"
Public Types | |
using | L_t = L |
using | R_t = R |
Public Member Functions | |
Either ()=delete | |
Either (const L &l) | |
Either (const R &r) | |
template<typename LPrime , typename RPrime , typename = EnableIf_t<std::is_convertible<LPrime, L>::value && std::is_convertible<RPrime, R>::value>> | |
Either (const Either< LPrime, RPrime > &other) | |
Either (const Either &)=default | |
Either (Either &&)=default | |
Either & | operator= (const Either &)=default |
Either & | operator= (Either &&)=default |
bool | IsLeft () const |
bool | IsRight () const |
const L & | GetLeft () const |
const R & | GetRight () const |
boost::optional< L > | MaybeLeft () const |
boost::optional< R > | MaybeRight () const |
boost::variant< L, R > | AsVariant () const |
template<typename F > | |
R | ToRight (F &&f) const |
Static Public Member Functions | |
template<typename RNew > | |
static Either< L, RNew > | FromMaybe (const boost::optional< RNew > &maybeRight, const L &left) |
static Either | Left (const L &l) |
static Either | Right (const R &r) |
template<typename RNew > | |
static EnableIf_t<!std::is_convertible< RNew, R >::value, Either< L, RNew > > | Right (const RNew &r) |
Friends | |
bool | operator== (const Either &e1, const Either &e2) |
bool | operator!= (const Either &e1, const Either &e2) |
using LeechCraft::Util::Either< L, R >::L_t = L |
using LeechCraft::Util::Either< L, R >::R_t = R |
|
delete |
Referenced by LeechCraft::Util::Either< L, R >::Either().
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Definition at line 70 of file either.h.
References LeechCraft::Util::Either< L, R >::AsVariant(), LeechCraft::Util::Either< L, R >::Either(), and LeechCraft::Util::Either< L, R >::operator=().
|
default |
|
default |
|
inline |
Definition at line 118 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::Either().
|
inlinestatic |
Definition at line 132 of file either.h.
References LeechCraft::Util::Either< L, R >::Left(), and LeechCraft::Util::Either< L, R >::Right().
|
inline |
Definition at line 90 of file either.h.
References LeechCraft::Util::Either< L, R >::IsLeft().
Referenced by LeechCraft::Util::InstanceFunctor< Either< L, R > >::Apply(), LeechCraft::Util::InstanceMonad< Either< L, R > >::Bind(), LeechCraft::Util::InstanceApplicative< Either< L, R > >::GSL(), LeechCraft::Util::Either< L, R >::MaybeLeft(), and LeechCraft::Util::Either< L, R >::ToRight().
|
inline |
Definition at line 97 of file either.h.
References LeechCraft::Util::Either< L, R >::IsRight().
Referenced by LeechCraft::Util::InstanceFunctor< Either< L, R > >::Apply(), LeechCraft::Util::InstanceMonad< Either< L, R > >::Bind(), LeechCraft::Util::InstanceApplicative< Either< L, R > >::GSL(), LeechCraft::Util::Either< L, R >::MaybeRight(), LeechCraft::Util::RightOr(), and LeechCraft::Util::Either< L, R >::ToRight().
|
inline |
Definition at line 80 of file either.h.
Referenced by LeechCraft::Util::InstanceFunctor< Either< L, R > >::Apply(), LeechCraft::Util::InstanceMonad< Either< L, R > >::Bind(), LeechCraft::Util::Either< L, R >::GetLeft(), LeechCraft::Util::InstanceApplicative< Either< L, R > >::GSL(), and LeechCraft::Util::Either< L, R >::MaybeLeft().
|
inline |
Definition at line 85 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::GetRight(), LeechCraft::Util::Either< L, R >::MaybeRight(), LeechCraft::Util::RightOr(), and LeechCraft::Util::Either< L, R >::ToRight().
|
inlinestatic |
Definition at line 139 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::FromMaybe().
|
inline |
Definition at line 104 of file either.h.
References LeechCraft::Util::Either< L, R >::GetLeft(), and LeechCraft::Util::Either< L, R >::IsLeft().
|
inline |
Definition at line 111 of file either.h.
References LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().
|
default |
Referenced by LeechCraft::Util::Either< L, R >::Either().
|
default |
|
inlinestatic |
Definition at line 144 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::FromMaybe(), LeechCraft::Util::InstanceApplicative< Either< L, R > >::Pure(), and LeechCraft::Util::Either< L, R >::Right().
|
inlinestatic |
Definition at line 150 of file either.h.
References LeechCraft::Util::Either< L, R >::Right().
|
inline |
Definition at line 124 of file either.h.
References LeechCraft::Util::Either< L, R >::GetLeft(), LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().