
Boost : 
From: Stephen Nutt (snutt_at_[hidden])
Date: 20020904 18:44:07
> That makes sense. Since you sent me you idea of the template definition,
> I'll drag you into discussions I've been having with Jim Grandy about
> exactly what the template definition is if you don't mind. I'm keen on
> being able to support an arbitary number of integer bits, unto and
including
> the number of bits in the integer type. While this doesn't match the
> J11/WG14 proposal, it will be compatiable. For my project I don't require
a
> different number of bits in the integer and fraction parts and so I won't
> become stubborn if everyone less me I am wrong, but it seems to make sense
> for this to be available.
> So from this, seems to be some desire to be able to specify the number of
> integer bits and fractional bits. For example you may want 6.8 for a
total
> of 14 bits. The obvious dissadvantages of this is that now three
parameters
> are required to specify the integer bits, fractional bits and sign, where
> otherwise an integer type and number of integer bits would provide all
three
> peices. Also, if the total number of bits do not add up to the total bits
> in an integer type, the template will need to clear out the unused bits
> after any operation that may set them, or use them.
Gosh did any of that make sense? I'm at home delirious with a fever today
and hence typing gibberish. Basically a template definition of
template <int integralDigits, int fractionalDigits, bool isSigned, [other
stuff]>
class fixed
{
...
}
was mentioned.
Post your thoughts and I'll promise to stay away from the keyboard until I'm
fit to return to work ;)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk