No need to include R.h when RcppArmadillo.h gets included#41
Merged
aalfons merged 2 commits intoaalfons:mainfrom Dec 9, 2025
Merged
No need to include R.h when RcppArmadillo.h gets included#41aalfons merged 2 commits intoaalfons:mainfrom
aalfons merged 2 commits intoaalfons:mainfrom
Conversation
Owner
|
@eddelbuettel - many thanks! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are probably going to include a check in the next Rcpp release which calls
messages()whenR.his included beforeRcpp.h(orRcppArmadillo.h). This can lead to side-effects regarding things like 'strict headers',Rf_*prefixing and alike. Your package (for which I had a local fork so it came up whengrep'ed around) was not affected and there is no need for immediate action, but just as you removed the#include "R.h"fromfastLars.cppbefore I could nag ... we still have one incorHuber.cpp. (Edit: Oh it tricked me. It is still there, but the whole function is commented out. Updated PR now.)So the PR here is really trivial and, again, not urgent but it may be a good idea to include it. One day, maybe in a year or two, we may make this a
warninginstead./cc RcppCore/Rcpp#1411, the current open PR for this in Rcpp