[Rcpp-devel] assert() for Rcpp?
krthornt at uci.edu
Wed Feb 18 18:02:49 CET 2015
Sorry, but your response is unclear to me. What was "taken care of"? What is 'tinyformat'? Are you trying to say that this method of defining assert will work with any other C++ library that includes <cassert>?
> On Feb 18, 2015, at 8:53 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> 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.
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Ecology and Evolutionary Biology
University of California, Irvine
More information about the Rcpp-devel