- events tested and implemented multithreading support through mpscq

This commit is contained in:
2025-12-23 12:24:23 -05:00
parent 1f6637408d
commit 184bc7fcdf
12 changed files with 281 additions and 31 deletions

View File

@@ -117,13 +117,20 @@ public:
}
///
/// \brief Move Constructor, transfers ownership from \f$other\f$
/// \param other The unique_ptr to take ownership from
constexpr unique_ptr(unique_ptr&& other)
: _handle(other._handle) {
other._handle = nullptr;
}
///
/// \brief Move Constructor, transfers ownership from \f$other\f$
/// \param other The unique_ptr to take ownership from
template<typename DerivedT> requires(is_base_of_v<TypeT, DerivedT>)
constexpr unique_ptr(unique_ptr<DerivedT>&& other)
: _handle(other.release()) {
}
// Delete copy constructor
constexpr unique_ptr(const unique_ptr&) = delete;
@@ -225,6 +232,11 @@ unique_ptr<TypeT> make_unique(ArgsT&&...args) {
return unique_ptr<TypeT>(new TypeT(fennec::forward<ArgsT>(args)...));
}
template<typename TypeT>
unique_ptr<TypeT> make_unique(TypeT* ptr) {
return unique_ptr<TypeT>(ptr);
}
}
#endif // FENNEC_MEMORY_POINTERS_H