Skip to content
Prev 2746 / 10988 Next

[Rcpp-devel] Code Refactor Proposal: exception specifiers

I had a poke around the Rcpp code today, and noticed exception
specifiers are used quite widely. I wondered if these were used with
full knowledge of their pros/cons in C++, or if they were put there by
someone coming from Java?

Some arguments against their use:
 * Item 14 in Meyer's More Effective C++
  (the Session destructor example was enough to convince me.)

 * Herb Sutter's "A Pragmatic Look at Exception Specifications":
   http://www.gotw.ca/publications/mill22.htm

 * C++0x has deprecated them.
  (it introduces "noexcept" as a better throw(), but not available until
g++ 4.6)

Darren