Template Function iox::cxx::make_optional

Function Documentation

template<typename OptionalBaseType, typename ...Targs>
optional<OptionalBaseType> iox::cxx::make_optional(Targs&&... args) noexcept

Creates an optional which contains a value by forwarding the arguments to the constructor of T.

Parameters:

args[in] arguments which will be perfectly forwarded to the constructor of T

Returns:

optional which contains T constructed with args