
16 Apr
2009
16 Apr
'09
7:16 a.m.
I'm seeking a way to perform compile-time "bitwise" casting of floating value aka turning a float into an uint32_t value with the same bit pattern. Eg: -3.14f becoming 0xC048F5C3 I saw a mpl::double_ in the vault but I can't make tail nor head of the trick used in the large macros.hpp file. Considering I only need the capability of storing a flaot as a bit pattern and don't need the additional arithmetic, can someone enlighten me on the process used in mpl::double ?