Adds documentation for undocumented functions
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-05-14 16:18:30 +02:00
parent 1d8bf3e747
commit 0b545c46ee
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 6 additions and 1 deletions

View File

@ -17,11 +17,12 @@ namespace ArbUt {
public:
inline UniquePtr<T>() {}
/// @brief Initialise a UniquePtr with a specific raw pointer.
inline UniquePtr<T>(T* non_null ptr) : _raw(ptr) { EnsureNotNull(ptr); };
inline UniquePtr<T>(T* non_null ptr) : _raw(ptr) { EnsureNotNull(ptr) };
NO_COPY_OR_MOVE(UniquePtr)
#if !WINDOWS // This doesn't work on mingw-w64 for some reason
/// @brief Do not allow nullreference assignment
UniquePtr<T>(std::nullptr_t) = delete;
#endif

View File

@ -2,9 +2,13 @@
#define ARBUTILS_MISC_HPP
#define NO_COPY_OR_MOVE(type) \
/* @brief: Copying is not allowed */ \
type(const type&) = delete; \
/* @brief: Copying is not allowed */ \
type(type&&) = delete; \
/* @brief: Copy assignment is not allowed */ \
type& operator=(const type&) = delete; \
/* @brief: Copy assignment is not allowed */ \
type& operator=(type&&) = delete;
#endif // ARBUTILS_MISC_HPP