# Offers features to interface with C++ code and libraries
module cpp is
- new_annotation cpp_compiler_option
+ new_annotation cppflags
end
# A pointer to a C++ std::string instance
redef class NativeString
# Get `self` as a `CppString`
fun to_cpp_string(length: Int): CppString in "C++" `{
- return new std::string(recv, length);
+ return new std::string(reinterpret_cast<char*>(self), length);
`}
end