Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-03-08 16:57:19


2011/3/7 Chad Nelson <chad.thecomfychair_at_[hidden]>:
> On Sun, 06 Mar 2011 18:35:47 -0800
> "Jeffrey Lee Hellrung, Jr." <jhellrung_at_[hidden]> wrote:
>
>>> XInt's existing interface could be frozen at its current state with
>>> no problem. Even the removal of the copy-on-write stuff would only
[...]
>
>>>> - is_odd, is_even, sign, hex_digits, is_nan: These are all member
>>>> functions with no same-named free function...which makes me wonder
>>>> why these were chosen to be member functions while the likes of
>>>> getbit, setbit, is_prime, etc. were chosen to be strictly free
>>>> functions.
>>>
>>> Because n1692, the paper presented to the C++ Standards Committee in
>>> 2004 that I based XInt's interface on, has them there.

Nope, I just looked at the paper, they are free standing functions
there. And they are named without the is_ prefix:

const int sign( const integer & );
const bool even( const integer & );
const bool odd( const integer & );
const bool getbit( const integer &, unsigned int );
...

BTW there is *no* nan and is_nan in this paper. Please be more precise.

Regards,
Joachim

-- 
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk