File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 223223#else
224224# define FMT_PRAGMA_CLANG (x )
225225#endif
226- #if FMT_MSC_VERSION
227- # define FMT_MSC_WARNING (...) __pragma(warning(__VA_ARGS__))
228- #else
229- # define FMT_MSC_WARNING (...)
230- #endif
231226
232227// Enable minimal optimizations for more compact code in debug mode.
233228FMT_PRAGMA_GCC (push_options)
@@ -1741,9 +1736,12 @@ template <typename T> class buffer {
17411736
17421737 protected:
17431738 // Don't initialize ptr_ since it is not accessed to save a few cycles.
1744- FMT_MSC_WARNING (suppress : 26495 )
17451739 constexpr buffer (grow_fun grow, size_t sz) noexcept
1746- : size_(sz), capacity_(sz), grow_(grow) {}
1740+ : size_(sz), capacity_(sz), grow_(grow) {
1741+ #if FMT_MSC_VERSION
1742+ ptr_ = nullptr ; // Suppress warning 26495.
1743+ #endif
1744+ }
17471745
17481746 constexpr buffer (grow_fun grow, T* p = nullptr , size_t sz = 0 ,
17491747 size_t cap = 0 ) noexcept
Original file line number Diff line number Diff line change 156156# define FMT_CONSTEXPR_STRING
157157#endif
158158
159+ #if FMT_MSC_VERSION
160+ # define FMT_MSC_WARNING (...) __pragma(warning(__VA_ARGS__))
161+ #else
162+ # define FMT_MSC_WARNING (...)
163+ #endif
164+
159165// GCC 4.9 doesn't support qualified names in specializations.
160166namespace std {
161167template <typename T> struct iterator_traits <fmt::basic_appender<T>> {
You can’t perform that action at this time.
0 commit comments