Boost logo

Boost :

Subject: Re: [boost] [xint] Question about suitability, portability, and "Boostiness"
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2010-04-14 11:50:47


"Chad Nelson" <chad.thecomfychair_at_[hidden]> wrote in message
news:4BC4A621.3020009_at_gmail.com...
> I just wanted to check with the people on this list about the
> portability of it. Since you guys collectively deal with that more than
> any other group in the world, I figured you would know if there were any
> hidden portability problems with the design. If I don't hear about any
> soon, I'll take it that there aren't any known ones and implement it.

Considering it is an ancient trick and that any compiler targeting an OS as
widespread as Windows has to 'support' it (e.g. BITMAPINFO struct) it is
probably safe to assume as 'safe'/portable...

OTOH, it would be great if you could separate the core 'big int'/math logic from
the storage/allocation logic, for example have:
- a base 'math handling' class with functions that all take the actual location
and size of the number as parameters
- a wrapping template class(es) that can be configured with policies whether to
use/work with fixed sized buffers/numbers (thus no memory allocation, thus no
exception handling code, thus maximally lean code) or dynamically sized buffers
(with or without SBOs, deep or shallow copies, reference counting etc etc...)...

--
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than from
one whose countenance exudes suspicion and hate."
Neil Postman 

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