You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional documentation is available via the [Rcpp book](http://www.rcpp.org/book/)
81
+
Additional documentation is available via the [Rcpp book](http://www.amazon.com/gp/product/1461468671/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1461468671&linkCode=as2&tag=rcpp-20&linkId=3P5LNUWOAQ2YMEJ6)
82
82
by Eddelbuettel (2013, Springer); see 'citation("Rcpp")' for details.
@@ -41,8 +41,8 @@ function (file, exclude = character(0), fill = TRUE)
41
41
42
42
\note{
43
43
When a C++ function has export bindings automatically generated by the \code{\link{compileAttributes}} function, it can optionally also have a direct C++ interface generated using the \code{\link[=interfacesAttribute]{Rcpp::interfaces}} attribute.
44
-
45
-
The \code{Rcpp::export} attribute is specified using a syntax compatible with the new \href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below).
44
+
45
+
o The \code{Rcpp::export} attribute is specified using a syntax compatible with the new \href{https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below).
46
46
}
47
47
48
48
\seealso{
@@ -61,7 +61,7 @@ int fibonacci(const int x) {
61
61
62
62
if (x == 0) return(0);
63
63
if (x == 1) return(1);
64
-
64
+
65
65
return (fibonacci(x - 1)) + fibonacci(x - 2);
66
66
}
67
67
@@ -71,11 +71,11 @@ NumericVector convolve(NumericVector a, NumericVector b) {
Copy file name to clipboardExpand all lines: man/interfacesAttribute.Rd
+7-8
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,14 @@ The \code{Rcpp::interfaces} attribute is added to a C++ source file to specify w
17
17
}
18
18
19
19
\details{
20
-
The \code{Rcpp::interfaces} attributeisusedtodeterminewhichbindingstogenerateforexportedfunctions.Thedefaultbehaviorifno \code{Rcpp::interfaces} attributeisspecifiedistogenerateonlyanRinterface.
21
-
20
+
The \code{Rcpp::interfaces} attributeisusedtodeterminewhichbindingstogenerateforexportedfunctions.Thedefaultbehaviorifno \code{Rcpp::interfaces} attributeisspecifiedistogenerateonlyanRinterface.
21
+
22
22
When \code{cpp} bindingsarerequestedcodeisgeneratedasfollows:
@@ -41,17 +41,17 @@ For example, an exported C++ function \code{foo} could be called from package \c
41
41
}
42
42
}
43
43
44
-
Theaboveexampleassumesthatthe \code{sourceCpp} functionwillbeusedtocompilethecode.Ifratherthanthatyouarebuildingapackagethenyoudon't need to include the \code{Rcpp::depends} attribute, but instead should add an entry for the referenced package in the \code{Depends} and \code{LinkingTo} fields of your package's \code{DESCRIPTION} file.
44
+
Theaboveexampleassumesthatthe \code{sourceCpp} functionwillbeusedtocompilethecode.Ifratherthanthatyouarebuildingapackagethenyoudon't need to include the \code{Rcpp::depends} attribute, but instead should add an entry for the referenced package in the \code{Depends} and \code{LinkingTo} fields of your package's \code{DESCRIPTION} file.
45
45
46
46
}
47
47
48
48
\note{
49
49
50
50
Ifafilebythenameof \emph{PackageName.h} thatwasn't generated by \code{compileAttributes} already exists in in the \code{inst/include} directory then it will not be overwritten (rather, an error will occur).
51
-
51
+
52
52
A static naming scheme for generated header files and namespaces is used to ensure consistent usage semantics for clients of exported \code{cpp} interfaces. Packages that wish to export more complex interfaces or additional C++ types are therefore typically better off not using this mechanism.
53
53
54
-
The \code{Rcpp::interfaces} attribute is specified using a syntax compatible with the new \href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below).
54
+
The \code{Rcpp::interfaces} attribute is specified using a syntax compatible with the new \href{https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf}{generalized attributes} feature of the C++11 standard. Note however that since this feature is not yet broadly supported by compilers it needs to be specified within a comment (see examples below).
55
55
}
56
56
57
57
@@ -65,4 +65,3 @@ For example, an exported C++ function \code{foo} could be called from package \c
0 commit comments