Suppress ubsan warning

This commit is contained in:
Victor Zverovich 2020-05-03 08:43:10 -07:00
parent c3099beb6f
commit 60d85d598c

View File

@ -342,6 +342,9 @@ template <typename T> inline T* make_checked(T* p, std::size_t) { return p; }
#endif #endif
template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)> template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
#if FMT_CLANG_VERSION
__attribute__((no_sanitize("undefined")))
#endif
inline checked_ptr<typename Container::value_type> reserve( inline checked_ptr<typename Container::value_type> reserve(
std::back_insert_iterator<Container> it, std::size_t n) { std::back_insert_iterator<Container> it, std::size_t n) {
Container& c = get_container(it); Container& c = get_container(it);