early-access version 2853
This commit is contained in:
20
externals/vcpkg/ports/boost-json/0001-json-array-erase-relocate.patch
vendored
Executable file
20
externals/vcpkg/ports/boost-json/0001-json-array-erase-relocate.patch
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
include/boost/json/impl/array.ipp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/boost/json/impl/array.ipp b/include/boost/json/impl/array.ipp
|
||||
index 4d067fb..a2c7fd6 100644
|
||||
--- a/include/boost/json/impl/array.ipp
|
||||
+++ b/include/boost/json/impl/array.ipp
|
||||
@@ -491,8 +491,11 @@ erase(
|
||||
auto const p = &(*t_)[0] +
|
||||
(pos - &(*t_)[0]);
|
||||
destroy(p, p + 1);
|
||||
- relocate(p, p + 1, 1);
|
||||
--t_->size;
|
||||
+ if(t_->size > 0)
|
||||
+ relocate(p, p + 1,
|
||||
+ t_->size - (p -
|
||||
+ &(*t_)[0]));
|
||||
return p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user