Skip to content
Prev 11129 / 12125 Next

[R-pkg-devel] use of assert in C++

On 2024-12-19 5:14 a.m., Bielow, Chris wrote:
I think it would be really misleading to have code that routinely 
ignored the assert() calls. In a year would you remember that those 
asserts were effectively just comments, not being acted on without some 
trickery to enable them?

You'd be much safer if you used a different function specific to R that 
triggered an R error if the assertion was false.

Duncan Murdoch