4 ms·
So you can have a constexpr (compile-time) code fragment that, say, casts a float to an unsigned int and extracts the mantissa. Mostly though, this is fairly u
by mediocrebs 9y ago
So you can have a constexpr (compile-time) code fragment that, say, casts a float to an unsigned int and extracts the mantissa.
Mostly though, this is fairly unimportant and tedious spec-manship, filling in some obvious gaps.
We had a version of this in chromium a few years ago. This is a proposal just picking that up from what I can tell.
- theresistor 9y agoBitcast, including the specific nomenclature, comes from LLVM, which had the concept more than 10 years ago.
- gpderetta 9y agoThe concept of bitcasting is as old as programming. In the context of C++, I'm also pretty sure that the bitcast template, in one form of another, is also much older than LLVM itself.