Added converting constructor for AllocatorDeleter.
This commit is contained in:
parent
9c4765dbaf
commit
2b368c1d4f
@ -20,7 +20,8 @@ private:
|
|||||||
[[no_unique_address]] TAllocator allocator_;
|
[[no_unique_address]] TAllocator allocator_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AllocatorDeleter(TAllocator allocator = {}) MIJIN_NOEXCEPT_IF(std::is_nothrow_move_constructible_v<TAllocator>)
|
AllocatorDeleter() = default;
|
||||||
|
explicit AllocatorDeleter(TAllocator allocator) MIJIN_NOEXCEPT_IF(std::is_nothrow_move_constructible_v<TAllocator>)
|
||||||
: allocator_(std::move(allocator)) {}
|
: allocator_(std::move(allocator)) {}
|
||||||
|
|
||||||
template<typename TOtherAllocator> requires (std::is_constructible_v<TAllocator, const TOtherAllocator&>)
|
template<typename TOtherAllocator> requires (std::is_constructible_v<TAllocator, const TOtherAllocator&>)
|
||||||
@ -69,6 +70,10 @@ class AllocatorDeleter<std::allocator<T>>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AllocatorDeleter() noexcept = default;
|
AllocatorDeleter() noexcept = default;
|
||||||
|
|
||||||
|
template<typename TOther>
|
||||||
|
AllocatorDeleter(std::allocator<TOther>) noexcept {}
|
||||||
|
|
||||||
template<typename TOther>
|
template<typename TOther>
|
||||||
AllocatorDeleter(const AllocatorDeleter<std::allocator<TOther>>&) noexcept {}
|
AllocatorDeleter(const AllocatorDeleter<std::allocator<TOther>>&) noexcept {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user