Fixes Windows issues
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-06-20 12:05:30 +02:00
parent c693c2635e
commit a0488d7078
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
4 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/cmake-build-debug/ /cmake-build-debug/
/cmake-build-debug-windows/
/cmake-build-debug-coverage/ /cmake-build-debug-coverage/
/cmake-build-release/ /cmake-build-release/
/build-release-windows/ /build-release-windows/

View File

@ -2,6 +2,7 @@
#define ARBUTILS___BORROWEDPTR_HPP #define ARBUTILS___BORROWEDPTR_HPP
#include "../Ensure.hpp" #include "../Ensure.hpp"
#include <cstddef>
namespace ArbUt { namespace ArbUt {
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils /// @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. /// @brief Initialise a BorrowedPtr with a std unique_ptr.
inline BorrowedPtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){}; 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; BorrowedPtr<T>(std::nullptr_t) = delete;
#endif
~BorrowedPtr() noexcept = default; ~BorrowedPtr() noexcept = default;

View File

@ -20,7 +20,9 @@ namespace ArbUt {
/// @brief Initialise a ScopedPtr with a std unique_ptr. /// @brief Initialise a ScopedPtr with a std unique_ptr.
inline ScopedPtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){}; 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; ScopedPtr<T>(std::nullptr_t) = delete;
#endif
~ScopedPtr() noexcept { delete _raw; } ~ScopedPtr() noexcept { delete _raw; }

View File

@ -22,7 +22,9 @@ namespace ArbUt {
/// @brief Initialise a UniquePtr with a std unique_ptr. /// @brief Initialise a UniquePtr with a std unique_ptr.
inline UniquePtr<T>(const std::unique_ptr<T>& other) : _raw(other.get()){}; 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; UniquePtr<T>(std::nullptr_t) = delete;
#endif
~UniquePtr() noexcept { delete _raw; } ~UniquePtr() noexcept { delete _raw; }