Closed vittorioromeo closed 6 years ago
This PR adds support for tl::optional to scelta. This excellent optional implementation provides useful continuations. E.g.
tl::optional
scelta
optional
tl::optional<image> get_cute_cat (const image& img) { return crop_to_cat(img) .and_then(add_bow_tie) .and_then(make_eyes_sparkle) .map(make_smaller) .map(add_rainbow); }
tl::optional support is enabled if __has_include(<tl/optional.hpp>). When enabled, the SCELTA_SUPPORT_OPTIONAL_TL is defined.
__has_include(<tl/optional.hpp>)
SCELTA_SUPPORT_OPTIONAL_TL
Automatic detection of tl::optional can be disabled by defining SCELTA_SUPPORT_OPTIONAL_TL_DISABLE.
SCELTA_SUPPORT_OPTIONAL_TL_DISABLE
This PR adds support for
tl::optional
toscelta
. This excellentoptional
implementation provides useful continuations. E.g.tl::optional
support is enabled if__has_include(<tl/optional.hpp>)
. When enabled, theSCELTA_SUPPORT_OPTIONAL_TL
is defined.Automatic detection of
tl::optional
can be disabled by definingSCELTA_SUPPORT_OPTIONAL_TL_DISABLE
.