[Coin-discuss] exception specifications
ladanyi at us.ibm.com
Sun Mar 5 15:05:07 EST 2006
I looked at the page Matt pointed to (and searched a bit elsewhere, too), and
the reasons for NOT to have exception specification in the code is fairly
compelling. I propose to remove them all. According to the docs I found this
should not break the compilation of any existing code relying on COIN code.
Could people verify this? If really nothing breaks and noone comes up with
other reasons for having the exception specifications then I'll remove then at
the end of March.
On Sun, 5 Mar 2006, Matthew Galati wrote:
> Is there a good reason to have an exception specification in the prototypes? As I understand it, if you miss an exception specification, this can cause run-time errors that should otherwise work fine. Identifying exceptions (for the sake of the user) can simply be done with documentation (comments), rather than in the prototype.
> This seems to be a debatable topic, but I somewhat agree with the views on this webpage:
> I don't feel strongly either way, but I do want to clean up my VS.net builds (I get several hundred of these):
> c:\cygwin\home\magala\COIN\Coin\include\CoinPackedVectorBase.hpp(66) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> c:\cygwin\home\magala\COIN\Coin\include\CoinPackedVectorBase.hpp(74) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> If we feel strongly that exception specifications are necessary, can we at least add a pragma to turn off compiler warnings?
> Matthew Galati - Optimization Developer
> SAS Institute - Analytical Solutions
> Phone 919-531-0332, R5327
> Fax 919-677-4444
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
More information about the Coin-discuss