Skip to content

bit: Use std::byte in bit_cast implementation#329

Merged
stotko merged 1 commit into
masterfrom
bit_use_std_byte
Oct 25, 2022
Merged

bit: Use std::byte in bit_cast implementation#329
stotko merged 1 commit into
masterfrom
bit_use_std_byte

Conversation

@stotko

@stotko stotko commented Oct 25, 2022

Copy link
Copy Markdown
Owner

C++17 also introduced std:.byte as a distinct type to better represent a collection of bits. Since the type aliasing rules for reinterpret_cast have been extended accordingly to also allow std::byte in addition to char and unsigned char, port the implementation of bit_cast to this new type.

Partially addresses #314

@stotko stotko added this to the 2.0.0 milestone Oct 25, 2022
@codecov

codecov Bot commented Oct 25, 2022

Copy link
Copy Markdown

Codecov Report

Base: 97.14% // Head: 97.14% // No change to project coverage 👍

Coverage data is based on head (561b6c9) compared to base (fa11236).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #329   +/-   ##
=======================================
  Coverage   97.14%   97.14%           
=======================================
  Files          32       32           
  Lines        2346     2346           
=======================================
  Hits         2279     2279           
  Misses         67       67           
Impacted Files Coverage Δ
src/stdgpu/impl/bit_detail.h 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stotko stotko merged commit 8aa40fa into master Oct 25, 2022
@stotko stotko deleted the bit_use_std_byte branch October 25, 2022 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant