Template Struct ExpectWithValue

Inheritance Relationships

Derived Types

Struct Documentation

template<typename Derived, typename ValueType>
struct ExpectWithValue

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

Public Functions

ValueType &expect(const char *const msg) & noexcept

Expects that the object is valid and returns the contained value, otherwise.

Parameters:

msg[in] Message which will be printed when the object is invalid

Returns:

a reference to the contained value

const ValueType &expect(const char *const msg) const & noexcept

Expects that the object is valid and returns the contained value, otherwise.

Parameters:

msg[in] Message which will be printed when the object is invalid

Returns:

a const reference the contained value

ValueType &&expect(const char *const msg) && noexcept

Expects that the object is valid and returns the contained value, otherwise.

Parameters:

msg[in] Message which will be printed when the object is invalid

Returns:

rvalue reference to the contained value

const ValueType &&expect(const char *const msg) const && noexcept

Expects that the object is valid and returns the contained value, otherwise.

Parameters:

msg[in] Message which will be printed when the object is invalid

Returns:

const rvalue reference to the contained value