diff --git a/.gitignore b/.gitignore index e38d506..7b550f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /cmake-build-debug/ +/cmake-build-debug-windows/ /cmake-build-debug-coverage/ /cmake-build-release/ /build-release-windows/ diff --git a/src/Memory/__BorrowedPtr.hpp b/src/Memory/__BorrowedPtr.hpp index 08124cf..8881526 100644 --- a/src/Memory/__BorrowedPtr.hpp +++ b/src/Memory/__BorrowedPtr.hpp @@ -2,6 +2,7 @@ #define ARBUTILS___BORROWEDPTR_HPP #include "../Ensure.hpp" +#include 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(const std::unique_ptr& other) : _raw(other.get()){}; +#if !WINDOWS // This doesn't work on mingw-w64 for some reason BorrowedPtr(std::nullptr_t) = delete; +#endif ~BorrowedPtr() noexcept = default; diff --git a/src/Memory/__ScopedPtr.hpp b/src/Memory/__ScopedPtr.hpp index 589b6bc..68a3c16 100644 --- a/src/Memory/__ScopedPtr.hpp +++ b/src/Memory/__ScopedPtr.hpp @@ -20,7 +20,9 @@ namespace ArbUt { /// @brief Initialise a ScopedPtr with a std unique_ptr. inline ScopedPtr(const std::unique_ptr& other) : _raw(other.get()){}; +#if !WINDOWS // This doesn't work on mingw-w64 for some reason ScopedPtr(std::nullptr_t) = delete; +#endif ~ScopedPtr() noexcept { delete _raw; } diff --git a/src/Memory/__UniquePtr.hpp b/src/Memory/__UniquePtr.hpp index b114783..1ce4411 100644 --- a/src/Memory/__UniquePtr.hpp +++ b/src/Memory/__UniquePtr.hpp @@ -22,7 +22,9 @@ namespace ArbUt { /// @brief Initialise a UniquePtr with a std unique_ptr. inline UniquePtr(const std::unique_ptr& other) : _raw(other.get()){}; +#if !WINDOWS // This doesn't work on mingw-w64 for some reason UniquePtr(std::nullptr_t) = delete; +#endif ~UniquePtr() noexcept { delete _raw; }