mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +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/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/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/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]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -171,12 +171,17 @@ class basic_multiallocation_chain
|
|||||||
|
|
||||||
std::pair<void_pointer, void_pointer> extract_data()
|
std::pair<void_pointer, void_pointer> extract_data()
|
||||||
{
|
{
|
||||||
|
if(BOOST_LIKELY(!slist_impl_.empty())){
|
||||||
std::pair<void_pointer, void_pointer> ret
|
std::pair<void_pointer, void_pointer> ret
|
||||||
(slist_impl_.begin().operator->()
|
(slist_impl_.begin().operator->()
|
||||||
,slist_impl_.last().operator->());
|
,slist_impl_.last().operator->());
|
||||||
slist_impl_.clear();
|
slist_impl_.clear();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return std::pair<void_pointer, void_pointer>();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
@@ -172,7 +172,7 @@ class resource_adaptor
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
explicit resource_adaptor(BOOST_RV_REF(Allocator) a2)
|
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)
|
resource_adaptor& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor) other)
|
||||||
|
Reference in New Issue
Block a user