Template Function iox::cxx::into

Function Documentation

template<typename T, typename F>
constexpr T iox::cxx::into(const F value) noexcept

Converts a value of type F to a corresponding value of type T. This is a convenience function which is automatically available when from is implemented. This function shall therefore not be specialized but always the from function.

Bar b = iox::cxx::into<Bar>(Foo::ENUM_VALUE);

Template Parameters:
  • T – is the ‘to’ type

  • F – is the ‘from’ type

Parameters:

value[in] of type F to convert to T

Returns:

converted value of F to corresponding value of T