Template Struct AndThen

Inheritance Relationships

Derived Types

Struct Documentation

template<typename Derived>
struct AndThen

Subclassed by iox::cxx::internal::FunctionalInterfaceImpl< Derived, void, ErrorType >, iox::cxx::internal::FunctionalInterfaceImpl< Derived, void, void >

Public Types

using and_then_callback_t = cxx::function_ref<void()>

Public Functions

Derived &and_then(const and_then_callback_t &callable) & noexcept

Calls the provided callable when the object is valid. If the object is not valid, nothing happens.

Parameters:

callable[in] will be called when valid

Returns:

reference to *this

const Derived &and_then(const and_then_callback_t &callable) const & noexcept

Calls the provided callable when the object is valid. If the object is not valid, nothing happens.

Parameters:

callable[in] will be called when valid

Returns:

const reference to *this

Derived &&and_then(const and_then_callback_t &callable) && noexcept

Calls the provided callable when the object is valid. If the object is not valid, nothing happens.

Parameters:

callable[in] will be called when valid

Returns:

rvalue reference to *this

const Derived &&and_then(const and_then_callback_t &callable) const && noexcept

Calls the provided callable when the object is valid. If the object is not valid, nothing happens.

Parameters:

callable[in] will be called when valid

Returns:

const rvalue reference to *this