|
Boost : |
From: Andy Little (andy_at_[hidden])
Date: 2005-10-31 14:19:50
"Cromwell Enage" wrote
> I have no qualms about changing the name, as long as
> all interested parties agree. Andy Little?
Shouldnt the two parts be described as integer_part and fractional_part ? And
also ... Why do they need to be macros?
BTW I have found that the ability to convert a rational to an
integral_constant if possible is a useful utility too, though I'm not quite sure
what purists would make of it as the resulting ::type may be an
integral_constant or maybe a rational constant. I currently call it
"simplify_rational_or_numeric". The resulting ::type works ok if accessed using
the numerator and denominator functions, and this allows me to make lists of
dimensions using both integral_constants and rationals. Maybe there is room for
such a concept as a "mpl rational or numeric concept" ?
Also, Cromwell, do you think that rational numerator and denominator should be
evaluated eagerly ( as it currently is) or alternatively lazily, so that it
would need some function to normalise the rational before or maybe during math?
(FWIW my vote is to stay with current behaviour though using
rational<nyumerator,denominator> for ::type member.)
Meanwhile keep up the good work..
regards
Andy Little
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk