From 9c6ed2289f2f6e4e85d6ab42be8b960e07fd4a4e Mon Sep 17 00:00:00 2001 From: Ziad Mostafa Date: Mon, 20 Feb 2023 17:37:28 +0100 Subject: [PATCH] iox-#1900 Apply reviewer's comments Signed-off-by: Ziad Mostafa --- doc/website/release-notes/iceoryx-unreleased.md | 14 ++++++++++++++ .../include/iceoryx_hoofs/iceoryx_hoofs_types.hpp | 1 + .../include/iox/detail/variant_internal.hpp | 1 - iceoryx_hoofs/vocabulary/include/iox/variant.hpp | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index 0330fd507b3..18a6a095633 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -1022,3 +1022,17 @@ // after #include "iox/duration.hpp" ``` +46. Renaming `byte_t` to `byte` + `byte` is not a simple type alias, now it is a distinct type like c++17 `std::byte`. + The type `byte` does not support any arithmetic operations nor has member functions. + + ```cpp + //before + using byte_t = uint8_t; + iox::byte_t m_size; + + //after + enum class byte : uint8_t {}; + iox::byte m_size; + ``` + diff --git a/iceoryx_hoofs/legacy/include/iceoryx_hoofs/iceoryx_hoofs_types.hpp b/iceoryx_hoofs/legacy/include/iceoryx_hoofs/iceoryx_hoofs_types.hpp index dc02be9f5f8..956dba5479d 100644 --- a/iceoryx_hoofs/legacy/include/iceoryx_hoofs/iceoryx_hoofs_types.hpp +++ b/iceoryx_hoofs/legacy/include/iceoryx_hoofs/iceoryx_hoofs_types.hpp @@ -26,6 +26,7 @@ namespace iox namespace cxx { /// @deprecated use `iox::byte` instead of `iox::cxx::byte_t` +using byte_t = byte; } // namespace cxx namespace log diff --git a/iceoryx_hoofs/vocabulary/include/iox/detail/variant_internal.hpp b/iceoryx_hoofs/vocabulary/include/iox/detail/variant_internal.hpp index 27e6ca21581..105ac0a9706 100644 --- a/iceoryx_hoofs/vocabulary/include/iox/detail/variant_internal.hpp +++ b/iceoryx_hoofs/vocabulary/include/iox/detail/variant_internal.hpp @@ -18,7 +18,6 @@ #define IOX_HOOFS_VOCABULARY_VARIANT_INTERNAL_HPP #include "iceoryx_hoofs/cxx/requires.hpp" -#include "iox/iceoryx_hoofs_types.hpp" #include #include diff --git a/iceoryx_hoofs/vocabulary/include/iox/variant.hpp b/iceoryx_hoofs/vocabulary/include/iox/variant.hpp index 1784b34ea27..aa8d5406189 100644 --- a/iceoryx_hoofs/vocabulary/include/iox/variant.hpp +++ b/iceoryx_hoofs/vocabulary/include/iox/variant.hpp @@ -19,6 +19,7 @@ #include "iox/algorithm.hpp" #include "iox/detail/variant_internal.hpp" +#include "iox/iceoryx_hoofs_types.hpp" #include #include