diff --git a/include/hibf/misc/bit_vector.hpp b/include/hibf/misc/bit_vector.hpp index f5f6a30d..adf918f9 100644 --- a/include/hibf/misc/bit_vector.hpp +++ b/include/hibf/misc/bit_vector.hpp @@ -947,15 +947,18 @@ class bit_vector : if (size > base_t::capacity()) base_t::reserve(size); -# if defined(_LIBCPP_VERSION) && !defined(_LIBCPP_HAS_NO_ASAN) +# if defined(_LIBCPP_VERSION) +# ifndef _LIBCPP_HAS_NO_ASAN __sanitizer_annotate_contiguous_container(base_t::data(), base_t::data() + base_t::capacity(), base_t::data() + base_t::size(), base_t::data() + size); -# endif - +# endif fake_vector & vec = reinterpret_cast(*this); vec.end = vec.begin + size; +# else + this->_M_impl._M_finish = this->_M_impl._M_start + size; +# endif } #else HIBF_CONSTEXPR_VECTOR inline void resize_for_overwrite(size_t const size)