[Coin-discuss] exception specifications
Matthew Galati
Matthew.Galati at sas.com
Sun Mar 5 12:26:23 EST 2006
Hi,
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:
http://www.codeproject.com/cpp/stdexceptionspec.asp
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?
Thanks,
Matt
Matthew Galati - Optimization Developer
SAS Institute - Analytical Solutions
Phone 919-531-0332, R5327
Fax 919-677-4444
http://coral.ie.lehigh.edu/~magh
http://ordlnx2.na.sas.com/projects/OptWiki
http://www.sas.com/technologies/analytics/optimization/
More information about the Coin-discuss
mailing list