28 Apr
2013
28 Apr
'13
2:14 p.m.
On Sun, 28 Apr 2013, Marc Glisse wrote:
On Sun, 28 Apr 2013, John Maddock wrote:
Decimal conversion would be next to impossible because you'd need a complete compile-time-arbitary-precision-arithmetic library :-(
You only need addition and shift by 1 bit, that doesn't seem so bad.
Not pretty, but here is an example, tested with gcc and clang. Now as to how you can determine if the context is constexpr to use this instead of more efficient runtime code... -- Marc Glisse