Fix compile error
This commit is contained in:
parent
5dca745a49
commit
eccc924f47
@ -859,6 +859,20 @@ FMT_CONSTEXPR auto copy_str(T* begin, T* end, U* out) -> U* {
|
||||
return out + size;
|
||||
}
|
||||
|
||||
#if defined(_SECURE_SCL) && _SECURE_SCL
|
||||
// Make a checked iterator to avoid MSVC warnings.
|
||||
template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;
|
||||
template <typename T>
|
||||
constexpr auto make_checked(T* p, size_t size) -> checked_ptr<T> {
|
||||
return {p, size};
|
||||
}
|
||||
#else
|
||||
template <typename T> using checked_ptr = T*;
|
||||
template <typename T> constexpr auto make_checked(T* p, size_t) -> T* {
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
\rst
|
||||
A contiguous memory buffer with an optional growing ability. It is an internal
|
||||
|
||||
@ -555,20 +555,6 @@ inline FMT_CONSTEXPR auto get_data(Container& c) ->
|
||||
return c.data();
|
||||
}
|
||||
|
||||
#if defined(_SECURE_SCL) && _SECURE_SCL
|
||||
// Make a checked iterator to avoid MSVC warnings.
|
||||
template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;
|
||||
template <typename T>
|
||||
constexpr auto make_checked(T* p, size_t size) -> checked_ptr<T> {
|
||||
return {p, size};
|
||||
}
|
||||
#else
|
||||
template <typename T> using checked_ptr = T*;
|
||||
template <typename T> constexpr auto make_checked(T* p, size_t) -> T* {
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Attempts to reserve space for n extra characters in the output range.
|
||||
// Returns a pointer to the reserved range or a reference to it.
|
||||
template <typename Container, FMT_ENABLE_IF(is_contiguous<Container>::value)>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user