Boost logo

Boost :

Subject: Re: [boost] [xint] Fourth release, requesting preliminary review again
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-06-04 08:59:24


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/04/2010 05:50 AM, Marius Stoica wrote:

>> I'm not sure that's really an improvement. The current design
>> separates throwing and nonthrowing for a reason; take a look at
>> some of the function implementations and you'll see why. Combining
>> those would mean, at the very least, an extra if statement in every
>> function.
>
> I just realised that nothrow integer wouldn't compile with -fno-excetpions.
> I was assuming that was it's point.

Nope. See the documentation for the full justification.

> I was thinking maby instead of using exceptions you could do
> something like this in the implementation
>
> if (n = maloc(...) == NULL) exceprion_fun(out_of_memory);
> that could be a function that throws with exceptions and handles the error for
> nothrow.

That could handle the XInt-generated ones. But since the XInt code has
to call out to other code too, that wouldn't solve the entire problem. I
don't think C++ allocators, for instance, have any way other than
exceptions to handle out-of-memory conditions.
- --
Chad Nelson
Oak Circle Software, Inc.
*
*
*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkwI+KgACgkQp9x9jeZ9/wTbJwCXY5+sYO9xrV1AkuNJav6pzrGc
1gCg64dyRyBoDGSSUAeWQbmFKpQf7Tk=
=MiJI
-----END PGP SIGNATURE-----


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