bit_cast/padding_cast
Open
- Dominant language
- C++
- Stars
- 156
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
*Problem
In many cases a bit_cast is needed. However, it cannot be assumed that std::bit_cast is available. Therefore it would make sense to "rebuild" this in boost; my implementation:
[cast.hpp.txt](https://github.com/boostorg/core/files/11617919/cast.hpp.txt)
*Functionality
- if std::bit_cast or __builtin_bit_cast are available they are used -> constexpr
- otherwise reinterpret_cast is used, but with the restrictions for std::bit_cast -> not constexpr
*padding_cast
- allows resizing
thx
Gero
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.