mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 15:27:49 +08:00
96ec7fb25d
* [scripts/boost] update to v1.79.0 * [boost-*] re-generate ports * update versions * [boost-wave] fix build * update version * [fbthrift] fix build compatibility with Boost 1.79.0 * update versions * [scripts/boost] use vcpkg_replace_string * update versions
21 lines
573 B
Diff
21 lines
573 B
Diff
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;
|
|
}
|
|
|