Template Function iox::cxx::makeScopedStatic

Function Documentation

template<typename T, typename ...CTorArgs>
GenericRAII iox::cxx::makeScopedStatic(T &memory, CTorArgs&&... ctorArgs) noexcept

Todo:

better name create a GenericRAII object to cleanup a static optional object at the end of the scope

Template Parameters:
  • [in] – T memory container which has emplace(…) and reset

  • [in] – CTorArgs ctor types for the object to construct

Parameters:
  • memory[in] is a reference to a memory container, e.g. cxx::optional

  • ctorArgs[in] ctor arguments for the object to construct

Returns:

cxx::GenericRAII