-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace iox::byte_t with std::byte #1900
Closed
3 tasks done
Labels
good first issue
Good for newcomers
refactoring
Refactor code without adding features
technical debt
unclean code and design flaws
Comments
elBoberido
added
good first issue
Good for newcomers
refactoring
Refactor code without adding features
technical debt
unclean code and design flaws
labels
Feb 15, 2023
@elBoberido this is a cool idea and I think we already have - maybe even multiple - definitions of that type. Why an enum class and not a |
@elfenpiff simple solutions for simple problems ;) The enum class is sufficient for this since we do not want to do any arithmetic with the type. We just want something which is 1 byte large and does not do anything. |
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 20, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
21 tasks
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 20, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 20, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 20, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 21, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 21, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
elBoberido
changed the title
Make iox::byte_t a distinct type
Align iox::byte_t with std::byte
Feb 21, 2023
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 21, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 21, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 21, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 27, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
zmostafa
added a commit
to zmostafa/iceoryx
that referenced
this issue
Feb 27, 2023
Signed-off-by: Ziad Mostafa <[email protected]>
elBoberido
changed the title
Align iox::byte_t with std::byte
Replace iox::byte_t with std::byte
Nov 17, 2023
22 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
refactoring
Refactor code without adding features
technical debt
unclean code and design flaws
Brief feature description
Currently
iox::byte_t
is auint8_t
. Having a distinct type like C++17 std::byte helps to prevent issues with accidentally passing auint8_t
where aiox::byte_t
is expected.Detailed information
A drop in replacement for
std::byte
with C++14 is not possible since the compiler does not treat anenum class byte : uint8_t {};
like anunsigned char
and therefore thestrict aliasing
rule cannot be applied. With C++17 besidechar
andunsigned char
alsostd::byte
can be used. See also theType aliasing
section in reinterpret_cast.Tasks
byte_t
typesiox::byte_t
toiox::byte
std::byte
when switching to C++17The text was updated successfully, but these errors were encountered: