mirror of
https://github.com/boostorg/container.git
synced 2025-08-01 13:34:30 +02:00
Fix GitHub #90 ("UBSAN failures detected in preflight CI PR")
This commit is contained in:
@@ -1261,6 +1261,8 @@ use [*Boost.Container]? There are several reasons for that:
|
||||
* [@https://github.com/boostorg/container/pull/84 GitHub #84: ['"Allow vector to be assigned to itself"]].
|
||||
* [@https://github.com/boostorg/container/pull/85 GitHub #85: ['"container: misc-typos"]].
|
||||
* [@https://github.com/boostorg/container/pull/86 GitHub #86: ['"Add missing warning re-enabling include"]].
|
||||
* [@https://github.com/boostorg/container/issues/90 GitHub #90: ['"UBSAN failures detected in preflight CI PR "]].
|
||||
|
||||
|
||||
[endsect]
|
||||
|
||||
|
@@ -171,11 +171,16 @@ class basic_multiallocation_chain
|
||||
|
||||
std::pair<void_pointer, void_pointer> extract_data()
|
||||
{
|
||||
std::pair<void_pointer, void_pointer> ret
|
||||
(slist_impl_.begin().operator->()
|
||||
,slist_impl_.last().operator->());
|
||||
slist_impl_.clear();
|
||||
return ret;
|
||||
if(BOOST_LIKELY(!slist_impl_.empty())){
|
||||
std::pair<void_pointer, void_pointer> ret
|
||||
(slist_impl_.begin().operator->()
|
||||
,slist_impl_.last().operator->());
|
||||
slist_impl_.clear();
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
return std::pair<void_pointer, void_pointer>();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -172,7 +172,7 @@ class resource_adaptor
|
||||
{}
|
||||
|
||||
explicit resource_adaptor(BOOST_RV_REF(Allocator) a2)
|
||||
: base_t(BOOST_MOVE_BASE(base_t, a2))
|
||||
: base_t(::boost::move(a2))
|
||||
{}
|
||||
|
||||
resource_adaptor& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor) other)
|
||||
|
Reference in New Issue
Block a user