| title | fn::and_then |
|---|
:include-doxygen-doc: fn::and_then_t
:include-doxygen-member: fn::and_then_t::operator() { signatureOnly: false, includeAllMatches: true }
A monadic type of the same kind.
:include-template: templates/snippet.md {
path: "simple/main.cpp",
surroundedBy: ["// example-optional-and_then-value"],
desc: "The resulting value is 13 because op is not a nullopt and therefore and_then is called."
}
:include-template: templates/snippet.md {
path: "simple/main.cpp",
surroundedBy: ["// example-optional-and_then-empty"],
desc: "The result is a nullopt because op was already a nullopt and therefore and_then is not called."
}