Fix CS0034 in Capacity method of std::vector

This commit is contained in:
gteubl 2022-03-18 08:01:37 +01:00
commit 8a6290b12f

View file

@ -63,7 +63,7 @@
return (int)capacity();
}
set {
if (value < size())
if (value < 0 || ($typemap(cstype, size_t))value < size())
throw new global::System.ArgumentOutOfRangeException("Capacity");
reserve(($typemap(cstype, size_t))value);
}