Skip to content

Commit

Permalink
iox-eclipse-iceoryx#831 Add release note entry for std::function remo…
Browse files Browse the repository at this point in the history
…val and

clang-format

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
  • Loading branch information
mossmaurice committed Jun 22, 2022
1 parent bfee243 commit ec2fc7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
- Remove `iox::posix::Timer` [\#337](https://github.com/eclipse-iceoryx/iceoryx/issues/337)
- Refactor service discovery tests [/#1065](https://github.com/eclipse-iceoryx/iceoryx/issues/1065)
to increase comprehension and cover more test cases
- Remove usage of `std::function` [\#831](https://github.com/eclipse-iceoryx/iceoryx/issues/831)

**New API features:**

Expand Down
3 changes: 2 additions & 1 deletion iceoryx_hoofs/include/iceoryx_hoofs/cxx/generic_raii.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class GenericRAIIWithVariableCapacity
/// called in the destructor
/// @param[in] initFunction callable which will be called in the constructor
/// @param[in] cleanupFunction callable which will be called in the destructor
GenericRAIIWithVariableCapacity(const function_ref<void()>& initFunction, const function<void()>& cleanupFunction) noexcept;
GenericRAIIWithVariableCapacity(const function_ref<void()>& initFunction,
const function<void()>& cleanupFunction) noexcept;

/// @brief calls m_cleanupFunction callable if it was set in the constructor
~GenericRAIIWithVariableCapacity() noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ namespace iox
namespace cxx
{
template <uint64_t Capacity>
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(const cxx::function<void(), Capacity>& cleanupFunction) noexcept
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(
const cxx::function<void(), Capacity>& cleanupFunction) noexcept
: GenericRAIIWithVariableCapacity(function_ref<void()>(), cleanupFunction)
{
}

template <uint64_t Capacity>
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(const function_ref<void()>& initFunction,
const function<void()>& cleanupFunction) noexcept
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(
const function_ref<void()>& initFunction, const function<void()>& cleanupFunction) noexcept
: m_cleanupFunction(cleanupFunction)
{
if (initFunction)
Expand All @@ -48,13 +49,15 @@ inline GenericRAIIWithVariableCapacity<Capacity>::~GenericRAIIWithVariableCapaci
}

template <uint64_t Capacity>
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(GenericRAIIWithVariableCapacity&& rhs) noexcept
inline GenericRAIIWithVariableCapacity<Capacity>::GenericRAIIWithVariableCapacity(
GenericRAIIWithVariableCapacity&& rhs) noexcept
{
*this = std::move(rhs);
}

template <uint64_t Capacity>
inline GenericRAIIWithVariableCapacity<Capacity>& GenericRAIIWithVariableCapacity<Capacity>::operator=(GenericRAIIWithVariableCapacity<Capacity>&& rhs) noexcept
inline GenericRAIIWithVariableCapacity<Capacity>&
GenericRAIIWithVariableCapacity<Capacity>::operator=(GenericRAIIWithVariableCapacity<Capacity>&& rhs) noexcept
{
if (this != &rhs)
{
Expand Down

0 comments on commit ec2fc7c

Please sign in to comment.