Re: [eigen] exception specifications... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] exception specifications...
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 17 Apr 2010 10:42:45 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=IqzDyxYwLUcoCAI79BvbpQkudaYj/9rJ/IdisopZF5g=; b=lGMhgoVus3x5XCvweFZ7Amx3uk2NkUAEhaMwwhmnfg/E2k76cRk1dKOMoOTBYfXPAQ e3JONuiRwwhkNJwD/pZquBNJnNOjW0afKCbunQkOO1EdjHxwU4tWJCOHhUJerPycqW2j Vi4sFhuKPa9jXTgJgJps8yb73vD5082npX7qo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=O7P3+g6eYuvSL/FNzMXGfieOsgZjn8LvsvS/FBfoWb6j94AlTV0xLFbl4qqkdg06u8 fXh+smhHka4QBvjR5QZvrx6Rhy692k5j8vRC29ubyRvtSc0nwrupE0ckE35u0oe1+iHe TAnB4CVVhv3128SYo3qrhYG1tWfjqOmRKL0ac=
I don't insist on anything: i don't know much about that, you're teaching me :)
Benoit
2010/4/17 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> I wanted to bring up this discussion once more in order to finish it... ;)
>
> On Mon, Mar 15, 2010 at 4:10 AM, leon zadorin <leonleon77@xxxxxxxxx> wrote:
>> On 3/14/10, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>>
>>> I thought it might be a good idea to remove the throw() declarations
>>
>> For as long as you retain your lib as 'header-only' one (i.e. no
>> shared lib files) -- with using extern/global functions et al, the
>> explicit "throw()" qualifier allows some compilers to optimize things
>> that they otherwise would/could not...
>>
>> For instance, from:
>> http://gcc.gnu.org/gcc-4.1/changes.html
>> we have:
>> "
>> When generating code for a shared library, GCC now recognizes that
>> global functions may be replaced when the program runs. Therefore, it
>> is now more conservative in deducing information from the bodies of
>> functions. For example, in this example:
>>
>> void f() {}
>> void g() {
>> try { f(); }
>> catch (...) {
>> cout << "Exception";
>> }
>> }
>>
>> G++ would previously have optimized away the catch clause, since it
>> would have concluded that f cannot throw exceptions. Because users may
>> replace f with another function in the main body of the program, this
>> optimization is unsafe, and is no longer performed. If you wish G++ to
>> continue to optimize as before, you must add a throw() clause to the
>> declaration of f to make clear that it does not throw exceptions.
>> "
>
> So, does it mean we want to keep stuff or should we follow the advices
> given by the boost devs and/or H. Sutter!?
>
> In case you insist of sticking to throw(), I can finally remove the
> code I have in my repository.
>
> - Hauke
>
>
>