Evaluate the given expression as C++ code, punning on Julia syntax to avoid needing to wrap the C++ code in a string, as in
cxx"". The three basic features provided by
- Static function calls:
- Member calls:
@cxx m->foo(args...), where
- Value references:
* inside a call, e.g.
@cxx foo(*(a)), is treated as a dereference of
a on the C++ side. Further, prefixing any value by
& takes the address of the given value.
@cxx foo(*(a)), the parentheses around
a are necessary since Julia syntax does not allow
* in the unary operator position otherwise.
Evaluate the given C++ code in the global scope. This can be used for declaring namespaces, classes, functions, global variables, etc. Unlike
cxx"" does not require punning on Julia syntax, which means, e.g., that unary
* for pointers does not require parentheses.
Evaluate the given C++ code at the function scope. This should be used for calling C++ functions and performing computations.
cxxinclude([C::CxxInstance,] fname; isAngled=false)
Include the C++ file specified by
fname. This should be used when the path of the included file needs to be assembled programmatically as a Julia string. In all other situations, it is avisable to just use
cxx"#include ...", which makes the intent clear and has the same directory resolution logic as C++.
addHeaderDir([C::CxxInstance,] dirname; kind=C_User, isFramework=false)
Add a directory to the Clang
#include path. The keyword argument
kind specifies the kind of directory, and can be one of
-isystem, but wrap in
isFramework argument is the equivalent of passing the
-F option to Clang.
Define a C++ macro. Equivalent to
An instance of the Clang compiler current in use.