fix compilation errors for vs2015

This commit is contained in:
mutouyun 2019-11-17 17:31:40 +08:00
parent 792a9b3339
commit 6d6047f742

View File

@ -51,20 +51,16 @@ private:
public:
allocator_wrapper() noexcept {}
// no copy
allocator_wrapper(const allocator_wrapper<T, AllocP>&) noexcept {}
template <typename U>
allocator_wrapper(const allocator_wrapper<U, AllocP>&) noexcept {}
// construct by copying (do nothing)
allocator_wrapper (const allocator_wrapper<T, AllocP>&) noexcept {}
allocator_wrapper& operator=(const allocator_wrapper<T, AllocP>&) noexcept { return *this; }
allocator_wrapper(allocator_wrapper<T, AllocP> && rhs) noexcept : alloc_(std::move(rhs.alloc_)) {}
template <typename U>
allocator_wrapper(allocator_wrapper<U, AllocP> && rhs) noexcept : alloc_(std::move(rhs.alloc_)) {}
allocator_wrapper(alloc_policy && rhs) noexcept : alloc_(std::move(rhs)) {}
// construct from a related allocator (do nothing)
template <typename U, typename AllocU> allocator_wrapper (const allocator_wrapper<U, AllocU>&) noexcept {}
template <typename U, typename AllocU> allocator_wrapper& operator=(const allocator_wrapper<U, AllocU>&) noexcept { return *this; }
allocator_wrapper& operator=(allocator_wrapper && rhs) noexcept {
alloc_ = std::move(rhs.alloc_);
return *this;
}
allocator_wrapper (allocator_wrapper && rhs) noexcept : alloc_ { std::move(rhs.alloc_) } {}
allocator_wrapper& operator=(allocator_wrapper && rhs) noexcept { alloc_ = std::move(rhs.alloc_); return *this; }
public:
// the other type of std_allocator