[Rcpp-devel] assert() for Rcpp?

Dirk Eddelbuettel edd at debian.org
Wed Feb 18 17:53:46 CET 2015


On 18 February 2015 at 08:34, Kevin Thornton wrote:
| Isn't there a potential issue if a package depends on multiple header-only C++ libraries, each of which may include <cassert>?  You'd have multiple definitions of the macro floating around, and the compiler will barf.

Been there, done that -- this whole discussion started because the most
recent Rcpp release had accidentally borked Luke's use of assert (as we
didn't prevent the newly added and hany 'tinyformat' one-header-library from
re-defining assert).  (And Kevin also added some other push/pop logic to only
define some other macros when we need them and to generally avoid spillage.)

So now that this has been taken care of, we are discussing how to provide a
more useful feature "not unlike assert" with proper Rcpp semantics.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list