stotko / stdgpu

stdgpu: Efficient STL-like Data Structures on the GPU
https://stotko.github.io/stdgpu/
Apache License 2.0
1.16k stars 83 forks source link

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

Closed stotko closed 2 years ago

stotko commented 2 years ago

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

codecov[bot] commented 2 years ago

Codecov Report

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

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 ```diff @@ Coverage Diff @@ ## master #329 +/- ## ======================================= Coverage 97.14% 97.14% ======================================= Files 32 32 Lines 2346 2346 ======================================= Hits 2279 2279 Misses 67 67 ``` | [Impacted Files](https://codecov.io/gh/stotko/stdgpu/pull/329?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko) | Coverage Δ | | |---|---|---| | [src/stdgpu/impl/bit\_detail.h](https://codecov.io/gh/stotko/stdgpu/pull/329/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9pbXBsL2JpdF9kZXRhaWwuaA==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko)

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