Avril
da8429e49c
Fixed test name-demangler relying on faulty string information.
...
Fortune for opaque_handle's current commit: Future small blessing − 末小吉
3 years ago
Avril
8dea5823a5
Added `opaque_handle::[try_]get_type()`: Get an `std::type_info` if possible.
...
Added typing related tests to main.
Fortune for opaque_handle's current commit: Small blessing − 小吉
3 years ago
Avril
95e6cae2ce
Added `opaque_handle.is_type()`, added `make_opaque_object_handle<T, Args...>()` to construct an `opaque_handle` from a new object T in-place.
...
Fortune for opaque_handle's current commit: Half curse − 半凶
3 years ago
Avril
2f32c1538f
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.)
...
Added TODO: Move impl-only constructs in the header into a (possible access-restricted or private) impl namespace.
Fortune for opaque_handle's current commit: Future blessing − 末吉
3 years ago
Avril
8168dd904d
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.
...
Fortune for opaque_handle's current commit: Curse − 凶
3 years ago
Avril
7d55dcf124
With fully incomplete types, `unsafe_cast` is used instead of `try_cast` in `operator [const] T*()`.
...
Fortune for opaque_handle's current commit: Curse − 凶
3 years ago
Avril
4f1481b589
Added rudimentary type-checking to make `try_cast` work. However, this breaks use with incomplete types, which is not acceptable...
...
Fortune for opaque_handle's current commit: Half blessing − 半吉
3 years ago
Avril
437037e8c6
Fix segfault in `opaque_handle` copy testing
...
Fortune for opaque_handle's current commit: Curse − 凶
3 years ago
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
Avril
e8813d52eb
All `make_opaque_handle()` functions cause compiler segfault at `constexpr bool is_nothrow`; they should be changed to #define macros.
...
Fortune for opaque_handle's current commit: Future blessing − 末吉
3 years ago
Avril
742aa072ec
`make_opaque_handle()` causes compiler to segfault when defining constexpr local shorthand for local class"s `noexcept`s: `is_nothrow`
...
Fortune for opaque_handle's current commit: Future small blessing − 末小吉
3 years ago
Avril
70d92c60b1
Initial commit
...
Added functional `opaque_object_handle<T>()` -> `opaque_handle`.
Added auto-casting operators for `opaque_handle`.
Fortune for opaque_handle's current commit: Blessing − 吉
3 years ago