diff options
| author | 2019-10-06 18:43:08 -0400 | |
|---|---|---|
| committer | 2019-10-06 18:49:49 -0400 | |
| commit | 57ffada746f8a3ba68895f5f14dea4b17fd9eaa8 (patch) | |
| tree | 1d72bb35a0a4fc91f5ea0a361c1e72573a8491cc /src | |
| parent | alignment: Specify trait definitions within the allocator (diff) | |
| download | yuzu-57ffada746f8a3ba68895f5f14dea4b17fd9eaa8.tar.gz yuzu-57ffada746f8a3ba68895f5f14dea4b17fd9eaa8.tar.xz yuzu-57ffada746f8a3ba68895f5f14dea4b17fd9eaa8.zip | |
alignment: Resolve allocator construction issues on debug
This was related to the source allocator being passed into the
constructor potentially having a different type than allocator being
constructed.
We simply need to provide a constructor to handle this case.
This resolves issues related to the allocator causing debug builds on
MSVC to fail.
Diffstat (limited to '')
| -rw-r--r-- | src/common/alignment.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/alignment.h b/src/common/alignment.h index e24f8b0e6..cdd4833f8 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h | |||
| @@ -57,6 +57,11 @@ public: | |||
| 57 | using is_always_equal = std::true_type; | 57 | using is_always_equal = std::true_type; |
| 58 | 58 | ||
| 59 | public: | 59 | public: |
| 60 | constexpr AlignmentAllocator() noexcept = default; | ||
| 61 | |||
| 62 | template <typename T2> | ||
| 63 | constexpr AlignmentAllocator(const AlignmentAllocator<T2, Align>&) noexcept {} | ||
| 64 | |||
| 60 | pointer address(reference r) noexcept { | 65 | pointer address(reference r) noexcept { |
| 61 | return std::addressof(r); | 66 | return std::addressof(r); |
| 62 | } | 67 | } |