Rcpp (version 0.12.9)

pluginsAttribute: Rcpp::plugins Attribute

Description

The Rcpp::plugins attribute is added to a C++ source file to specify the inline plugins that should be used in the compilation.
// [[Rcpp::plugins(plugin1, plugin2)]]

Arguments

...
Plugins to add to the compilation.

Details

Plugins must be registered using the registerPlugin function.

When included within a sourceCpp translation unit, the configuration-related fields of the plugin (e.g. env and LinkingTo) are utilized, however the code-generation fields (e.g. includes and body) are not.

See Also

registerPlugin

Examples

Run this code
## Not run: 
# 
# // [[Rcpp::plugins(cpp11)]]
# 
# // [[Rcpp::export]]
# int useCpp11() {
#     auto x = 10;
#     return x;
# }
# ## End(Not run)

Run the code above in your browser using DataLab