Bug 1828784 - Work around VS 2019+ SDK issue. r=glandium

This is enough to prevent the undesired instantiation.

Differential Revision: https://phabricator.services.mozilla.com/D175920
This commit is contained in:
Emilio Cobos Álvarez 2023-04-19 22:51:46 +00:00
parent a73c63f734
commit b8f531e854
2 changed files with 6 additions and 5 deletions

View File

@ -47,8 +47,8 @@ class GCVector {
public:
using ElementType = T;
explicit GCVector(AllocPolicy alloc = AllocPolicy())
: vector(std::move(alloc)) {}
explicit GCVector(AllocPolicy alloc) : vector(std::move(alloc)) {}
GCVector() : GCVector(AllocPolicy()) {}
GCVector(GCVector&& vec) : vector(std::move(vec.vector)) {}

View File

@ -341,9 +341,8 @@ template <typename T, size_t MinInlineCapacity = 0,
class AllocPolicy = MallocAllocPolicy>
class MOZ_NON_PARAM Vector final : private AllocPolicy {
/* utilities */
static constexpr bool kElemIsPod =
std::is_trivial<T>::value && std::is_standard_layout<T>::value;
std::is_trivial_v<T> && std::is_standard_layout_v<T>;
typedef detail::VectorImpl<T, MinInlineCapacity, AllocPolicy, kElemIsPod>
Impl;
friend struct detail::VectorImpl<T, MinInlineCapacity, AllocPolicy,
@ -540,7 +539,9 @@ class MOZ_NON_PARAM Vector final : private AllocPolicy {
typedef T ElementType;
explicit Vector(AllocPolicy = AllocPolicy());
explicit Vector(AllocPolicy);
Vector() : Vector(AllocPolicy()) {}
Vector(Vector&&); /* Move constructor. */
Vector& operator=(Vector&&); /* Move assignment. */
~Vector();