Added `opaque_handle.is_type()`, added `make_opaque_object_handle<T, Args...>()` to construct an `opaque_handle` from a new object T in-place.Avril2022-03-12 22:14:59 +0000
Added TODO: Document the header and turn into a single-header library. Useful for C interop with incomplete types, and also for type-erasure (PIMPL-like usage with complete C++ types as a makeshift std::any that holds only 1 pointer and 1 type could come up.)Avril2022-03-12 20:26:23 +0000
Added opaque_handle::ptr_cast(): Use `try_cast()` for complete types, and `unsafe_cast()` for incomplete types. This is used *only* for `operator [const] T*()`, since this is intended for C interop. `operator->` and `operator*` will only work with complete types, as they should.Avril2022-03-12 20:19:51 +0000
Added rudimentary type-checking to make `try_cast` work. However, this breaks use with incomplete types, which is not acceptable...Avril2022-03-12 19:16:22 +0000
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.Avril2022-03-12 17:48:48 +0000
All `make_opaque_handle()` functions cause compiler segfault at `constexpr bool is_nothrow`; they should be changed to #define macros.Avril2022-03-12 16:55:32 +0000
`make_opaque_handle()` causes compiler to segfault when defining constexpr local shorthand for local class"s `noexcept`s: `is_nothrow`Avril2022-03-12 16:51:30 +0000