Skip to content

Commit

Permalink
iox-#1934 Alias invoke_result to correct implementation based on C++ …
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
alban-apexai committed Apr 3, 2023
1 parent 207d419 commit 40692fe
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 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 @@ -74,6 +74,7 @@
- Fix potential memory leak in `iox::stack` [\#1893](https://github.com/eclipse-iceoryx/iceoryx/issues/1893)
- Make `MAX_USER_NAME_LENGTH` and `MAX_GROUP_NAME_LENGTH` platform-dependent [\#1919](https://github.com/eclipse-iceoryx/iceoryx/issues/1919)
- Fix milliseconds in log timestamps [\#1932](https://github.com/eclipse-iceoryx/iceoryx/issues/1932)
- Alias `invoke_result` to correct implementation based on C++ version [\#1934](https://github.com/eclipse-iceoryx/iceoryx/issues/1934)

**Refactoring:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";
constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 32;

#if __cplusplus >= 201703L
template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C(Cargs...)>;
#else
template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
#endif
} // namespace platform
} // namespace iox

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";
constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

#if __cplusplus >= 201703L
template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;
using invoke_result = std::invoke_result<C(Cargs...)>;
#else
template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
#endif

} // namespace platform
} // namespace iox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/var/lock/";
constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

#if __cplusplus >= 201703L
template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C(Cargs...)>;
#else
template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
#endif
} // namespace platform
} // namespace iox

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ constexpr const char IOX_LOCK_FILE_PATH_PREFIX[] = "/tmp/";
constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

#if __cplusplus >= 201703L
template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;
using invoke_result = std::invoke_result<C(Cargs...)>;
#else
template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
#endif

} // namespace platform
} // namespace iox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ constexpr uint64_t IOX_MAX_PATH_LENGTH = 255U;
constexpr uint64_t MAX_USER_NAME_LENGTH = 32;
constexpr uint64_t MAX_GROUP_NAME_LENGTH = 16;

#if __cplusplus >= 201703L
template <typename C, typename... Cargs>
using invoke_result = std::invoke_result<C, Cargs...>;
using invoke_result = std::invoke_result<C(Cargs...)>;
#else
template <typename C, typename... Cargs>
using invoke_result = std::result_of<C(Cargs...)>;
#endif

namespace win32
{
Expand Down

0 comments on commit 40692fe

Please sign in to comment.