[Rcpp-devel] Code Refactor Proposal: exception specifiers

Darren Cook darren at dcook.org
Tue Aug 16 04:45:56 CEST 2011


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

-- 
Darren Cook, Software Researcher/Developer

http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)


More information about the Rcpp-devel mailing list