C++14 syntax / diagnostics in RStudio

rcpp

#1

Hi, I want to make Rcpp package with C++14 but RStudio does not recognise C++14 syntax.
I had success with C++11 with // [[Rcpp::plugins(cpp11)]],
also C++11 specified in DESCRIPTION file and Makevars.win,
but that does not work for C++14.
Is there a way to make RStudio know C++14?
(Windows 10)


#2

Rcpp does distribute a C++14 plugin, usable with:

// [[Rcpp::plugins(cpp14)]]

Does that work in your case? If not, it's possible that RStudio needs to do some extra work to handle C++14 (and above) compilation units.

The version of libclang used by RStudio is getting somewhat old and may not understand all of the constructs used in C++14 -- we hope to upgrade it in a future release.


#3

Yeah, that plugin does not work. I've read about the old libclang on windows in another post and a plan to have it updated in upcoming update for RStudio.
I was hoping that somebody had some workaround to solve this.