diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-10-06 18:43:08 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-10-06 18:49:49 -0400 |
| commit | 18a54d5b01fedbe3f4b2d134a5ed56d9a7ba459a (patch) | |
| tree | 1d72bb35a0a4fc91f5ea0a361c1e72573a8491cc /src/common/alignment.h | |
| parent | a8ad9b2141cc53d0367836e58153b9b707005476 (diff) | |
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 'src/common/alignment.h')
| -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 e24f8b0e6b..cdd4833f81 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h @@ -57,6 +57,11 @@ public: using is_always_equal = std::true_type; public: + constexpr AlignmentAllocator() noexcept = default; + + template <typename T2> + constexpr AlignmentAllocator(const AlignmentAllocator<T2, Align>&) noexcept {} + pointer address(reference r) noexcept { return std::addressof(r); } |
