If use resize method with value for integer types, for example
kf::vector<int, PagedPool> test; test.resize(10, 1);
it leads to import the memcmp function to the resulting binary.
It occurs because resize internally calls _Uninitialized_fill_n method that use _Is_all_bits_zero method
template <class _Ty> _NODISCARD bool _Is_all_bits_zero(const _Ty& _Val) { // checks if scalar type has all bits set to zero _STL_INTERNAL_STATIC_ASSERT(is_scalar_v<_Ty> && !is_member_pointer_v<_Ty>); constexpr _Ty _Zero{}; return _CSTD memcmp(&_Val, &_Zero, sizeof(_Ty)) == 0; }
If use resize method with value for integer types, for example
kf::vector<int, PagedPool> test; test.resize(10, 1);it leads to import the memcmp function to the resulting binary.
It occurs because resize internally calls _Uninitialized_fill_n method that use _Is_all_bits_zero method
template <class _Ty> _NODISCARD bool _Is_all_bits_zero(const _Ty& _Val) { // checks if scalar type has all bits set to zero _STL_INTERNAL_STATIC_ASSERT(is_scalar_v<_Ty> && !is_member_pointer_v<_Ty>); constexpr _Ty _Zero{}; return _CSTD memcmp(&_Val, &_Zero, sizeof(_Ty)) == 0; }