core :: union_find
union–find algorithm using an efficient disjoint-set data structure
# Services for compatibility with C++ code and libraries
module cpp is
new_annotation cppflags
end
# A pointer to a C++ std::string instance
extern class CppString in "C++" `{ std::string* `}
end
redef class Text
# Get `self` as a `CppString`
fun to_cpp_string: CppString do return to_cstring.to_cpp_string(length)
end
redef class CString
# Get `self` as a `CppString`
fun to_cpp_string(length: Int): CppString in "C++" `{
return new std::string(self, length);
`}
end
lib/cpp/cpp.nit:17,1--36,3