Some scripts for the generation of type-erased interfaces in C++11 (motivated by https://github.com/tzlaine/type_erasure).
- python2
- libclang with python-bindings
python2 type_erase.py --handle-file implementation_details.hh --interface-file type_erased_interface.hh given_interface.hh
Most relevant parameters:
- '--vtable' for vtable-based type erasure
- '--sbo' to enable small buffer optimization
- '--buffer' to specify the buffer size when using small buffer optimization
- '--cow' to enable copy-on-write