Warn or error if Rcpp.h (and R.h) was included

Aperta
#142 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp, r
Ambito
tooling

Direzione di ricerca

Start in RcppEigen.h and inspect how the Rcpp and R header guards are detected before Eigen is included. Trace the include order described in the issue, then confirm that including R.h or Rcpp.h before RcppEigen.h produces the intended warning without changing the normal direct-include path.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

As discussed over in Rcpp in https://github.com/RcppCore/Rcpp/pull/1402 we are seeing some side effects from some package including R.h and later including possible also Rcpp.h and then RcppEigen.h leaving some of the masking of R's own error() function as Rf_error() to not be effective so that it later clashes with Eigen function error().

In general, it is always cleanest to just include RcppEigen.h as it does take care of both the others. For RcppArmadillo this once lead to issues to that it (very early on) switch to an actual compile error. We may do that one day but for now it might be a good idea to at least warn from RcppEigen.h if the header guards for either or both of Rcpp and R are seen.

Lingua principale
C++
Stelle
118
Fork
43
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RcppCore/RcppEigen

Tutte le issue di RcppCore/RcppEigen

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.