A single-header-only opaque type-erased object handle library for C++.
For interop with C libraries that use incomplete types and for general type-erasure and type-safe internal casting.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Avril
d0558318b0
Tested all variants of `make_opaque_handle()`, they all work. `opaque_handle` workable in a project; however. `try_cast()` does not work correctly and will not return `nullptr` if the types are wrong. TODO: Fixing this will require a refactor to use another inheritance graph of objects instead of `void*`, however, this is intended for work using C interfaces, so it"s not a high priority for it to work on polymorphic types.
...
Fortune for opaque_handle's current commit: Small blessing − 小吉
3 years ago
include
Tested all variants of `make_opaque_handle()`, they all work. `opaque_handle` workable in a project; however. `try_cast()` does not work correctly and will not return `nullptr` if the types are wrong. TODO: Fixing this will require a refactor to use another inheritance graph of objects instead of `void*`, however, this is intended for work using C interfaces, so it"s not a high priority for it to work on polymorphic types.
3 years ago
src
Tested all variants of `make_opaque_handle()`, they all work. `opaque_handle` workable in a project; however. `try_cast()` does not work correctly and will not return `nullptr` if the types are wrong. TODO: Fixing this will require a refactor to use another inheritance graph of objects instead of `void*`, however, this is intended for work using C interfaces, so it"s not a high priority for it to work on polymorphic types.
3 years ago
.gitignore
Tested all variants of `make_opaque_handle()`, they all work. `opaque_handle` workable in a project; however. `try_cast()` does not work correctly and will not return `nullptr` if the types are wrong. TODO: Fixing this will require a refactor to use another inheritance graph of objects instead of `void*`, however, this is intended for work using C interfaces, so it"s not a high priority for it to work on polymorphic types.
3 years ago