![]() |
LeechCraft
0.6.70-10870-g558588d6ec
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 = std::enable_if_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 std::enable_if_t<!std::is_convertible< RNew, R >::value, Either< L, RNew > > | Right (const RNew &r) |
static auto | EmbeddingLeft () |
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 |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Definition at line 71 of file either.h.
References LeechCraft::Util::Either< L, R >::AsVariant().
|
default |
|
default |
|
inline |
Definition at line 119 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::Either(), and LeechCraft::Util::Visit().
|
inlinestatic |
Definition at line 156 of file either.h.
References LeechCraft::Util::Either< L, R >::Left().
|
inlinestatic |
Definition at line 133 of file either.h.
References LeechCraft::Util::Either< L, R >::Left(), and LeechCraft::Util::Either< L, R >::Right().
|
inline |
Definition at line 91 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::Either< L, R >::MaybeLeft(), and LeechCraft::Util::Either< L, R >::ToRight().
|
inline |
Definition at line 98 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::Either< L, R >::MaybeRight(), LeechCraft::Util::RightOr(), and LeechCraft::Util::Either< L, R >::ToRight().
|
inline |
Definition at line 81 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(), and LeechCraft::Util::Either< L, R >::MaybeLeft().
|
inline |
Definition at line 86 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 140 of file either.h.
Referenced by LeechCraft::Util::Either< L, R >::EmbeddingLeft(), and LeechCraft::Util::Either< L, R >::FromMaybe().
|
inline |
Definition at line 105 of file either.h.
References LeechCraft::Util::Either< L, R >::GetLeft(), and LeechCraft::Util::Either< L, R >::IsLeft().
|
inline |
Definition at line 112 of file either.h.
References LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().
|
default |
|
default |
|
inlinestatic |
Definition at line 145 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 151 of file either.h.
References LeechCraft::Util::Either< L, R >::Right().
|
inline |
Definition at line 125 of file either.h.
References LeechCraft::Util::oral::sph::f, LeechCraft::Util::Either< L, R >::GetLeft(), LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().