swiftfn / Cpp4Susans

Tool to automatically create bindings around C++ for other languages, based on Clang/LLVM
1 stars 0 forks source link

Skia: Investigate what sk_sp is and how to convert it #15

Open ngocdaothanh opened 4 years ago

ngocdaothanh commented 4 years ago

https://github.com/google/skia/blob/master/include/core/SkRefCnt.h#L215

/**
 *  Shared pointer class to wrap classes that support a ref()/unref() interface.
 *
 *  This can be used for classes inheriting from SkRefCnt, but it also works for other
 *  classes that match the interface, but have different internal choices: e.g. the hosted class
 *  may have its ref/unref be thread-safe, but that is not assumed/imposed by sk_sp.
 */
template <typename T> class sk_sp {
ngocdaothanh commented 4 years ago

sk_sp doesn't exist in the XML output, because CastXML doesn't fully support template: "gccxml never supported uninstantiated templates at all" (GCC-XML has been succeeded by CastXML.)

https://github.com/CastXML/CastXML/issues?q=is%3Aissue+template