-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from traversc/master
undef TRUE and FALSE macros
- Loading branch information
Showing
5 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: RcppParallel | ||
Type: Package | ||
Title: Parallel Programming Tools for 'Rcpp' | ||
Version: 5.1.7-9000 | ||
Version: 5.1.7-9001 | ||
Authors@R: c( | ||
person("JJ", "Allaire", role = c("aut"), email = "[email protected]"), | ||
person("Romain", "Francois", role = c("aut", "cph")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @title Test for TRUE and FALSE macros | ||
* @author Travers Ching | ||
* @license GPL (>= 2) | ||
*/ | ||
|
||
// TRUE and FALSE macros that may come with system headers on some systems | ||
// But conflict with R.h (R_ext/Boolean.h) | ||
// TRUE and FALSE macros should be undef in RcppParallel.h | ||
|
||
#include <Rcpp.h> | ||
#include <RcppParallel.h> | ||
|
||
// [[Rcpp::depends(RcppParallel)]] | ||
|
||
#ifndef TRUE | ||
static_assert(true, "Macro TRUE does not exist"); | ||
#else | ||
static_assert(false, "Macro TRUE exists"); | ||
#endif | ||
|
||
#ifndef FALSE | ||
static_assert(true, "Macro FALSE does not exist"); | ||
#else | ||
static_assert(false, "Macro FALSE exists"); | ||
#endif | ||
|
||
// [[Rcpp::export]] | ||
int hush_no_export_warning() { | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
library(Rcpp) | ||
library(RUnit) | ||
|
||
sourceCpp(system.file("tests/cpp/truefalse_macros.cpp", package = "RcppParallel")) | ||
|