Parses a header file with one or multiple interface definitions and creates the corresponding type-erased interfaces.
- Options:
- Choose between the straight-forward implementation of type-erased interfaces based on built-in dynamical polymorphism or an optimized implementation that is based on custom function tables.
- copy-on-write
- small buffer optimization
- non-copyable interfaces
- no RTTI
- clang-type-erase is based on Clang's LibTooling. To compile it:
- obtain Clang
- download/clone clang-type-erase and place the folder
clang-type-eraseinto\<path-to-llvm\>/tools/clang/tools/extra - add
add_subdirectory(clang-type-erase)to\<path-to-llvm\>/tools/clang/tools/extra/CMakeLists.txt - (re-)compile (see here)