mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Add missing include, try disable warnings on MSVC.
This commit is contained in:
parent
6da2c53099
commit
ca7e689e08
6
format.h
6
format.h
@ -36,6 +36,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@ -99,6 +100,9 @@ class Array {
|
||||
const T &operator[](std::size_t index) const { return ptr_[index]; }
|
||||
};
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4996)
|
||||
|
||||
template <typename T, std::size_t SIZE>
|
||||
void Array<T, SIZE>::Grow(std::size_t size) {
|
||||
capacity_ = (std::max)(size, capacity_ + capacity_ / 2);
|
||||
@ -118,6 +122,8 @@ void Array<T, SIZE>::append(const T *begin, const T *end) {
|
||||
size_ += num_elements;
|
||||
}
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
// Information about an integer type.
|
||||
// IntTraits is not specialized for integer types smaller than int,
|
||||
// since these are promoted to int.
|
||||
|
Loading…
Reference in New Issue
Block a user