Fixes Windows issues
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c693c2635e
commit
a0488d7078
|
@ -1,4 +1,5 @@
|
|||
/cmake-build-debug/
|
||||
/cmake-build-debug-windows/
|
||||
/cmake-build-debug-coverage/
|
||||
/cmake-build-release/
|
||||
/build-release-windows/
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define ARBUTILS___BORROWEDPTR_HPP
|
||||
|
||||
#include "../Ensure.hpp"
|
||||
#include <cstddef>
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils
|
||||
|
@ -22,7 +23,9 @@ namespace ArbUt {
|
|||
/// @brief Initialise a BorrowedPtr with a std unique_ptr.
|
||||
inline BorrowedPtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){};
|
||||
|
||||
#if !WINDOWS // This doesn't work on mingw-w64 for some reason
|
||||
BorrowedPtr<T>(std::nullptr_t) = delete;
|
||||
#endif
|
||||
|
||||
~BorrowedPtr() noexcept = default;
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@ namespace ArbUt {
|
|||
/// @brief Initialise a ScopedPtr with a std unique_ptr.
|
||||
inline ScopedPtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){};
|
||||
|
||||
#if !WINDOWS // This doesn't work on mingw-w64 for some reason
|
||||
ScopedPtr<T>(std::nullptr_t) = delete;
|
||||
#endif
|
||||
|
||||
~ScopedPtr() noexcept { delete _raw; }
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ namespace ArbUt {
|
|||
/// @brief Initialise a UniquePtr with a std unique_ptr.
|
||||
inline UniquePtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){};
|
||||
|
||||
#if !WINDOWS // This doesn't work on mingw-w64 for some reason
|
||||
UniquePtr<T>(std::nullptr_t) = delete;
|
||||
#endif
|
||||
|
||||
~UniquePtr() noexcept { delete _raw; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue