Skip to content

Commit f6428d9

Browse files
authored
Conditionally define R_NO_REMAP and STRICT_R_HEADERS (#410)
* Conditionally define `R_NO_REMAP` and `STRICT_R_HEADERS` * NEWS bullet * Fill in number
1 parent 4b4d780 commit f6428d9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# cpp11 (development version)
22

3+
* `R_NO_REMAP` and `STRICT_R_HEADERS` are now conditionally defined only if they
4+
have not already been defined elsewhere. This is motivated by the fact that
5+
`R_NO_REMAP` is becoming the default for C++ code in R 4.5.0 (#410).
6+
37
* Because cpp11 now requires R >=4.0.0 and `R_UnwindProtect()` is always
48
available, `HAS_UNWIND_PROTECT` is no longer useful. Please avoid using it,
59
as we'd like to remove it in the future (#411).

inst/include/cpp11/R.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
#endif
99
#endif
1010

11+
#ifndef R_NO_REMAP
1112
#define R_NO_REMAP
13+
#endif
14+
15+
#ifndef STRICT_R_HEADERS
1216
#define STRICT_R_HEADERS
17+
#endif
18+
1319
#include "R_ext/Boolean.h"
1420
#include "Rinternals.h"
1521
#include "Rversion.h"

0 commit comments

Comments
 (0)