diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 8ce043f63aaec..cec453f48e2b2 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -8,6 +8,7 @@ #ifndef FMT_COMPILE_H_ #define FMT_COMPILE_H_ +#include "core.h" #include "format.h" FMT_BEGIN_NAMESPACE @@ -36,7 +37,7 @@ template class truncating_iterator_base { using difference_type = std::ptrdiff_t; using pointer = void; using reference = void; - using _Unchecked_type = + using FMT_UNCHECKED_TYPE = truncating_iterator_base; // Mark iterator as checked. OutputIt base() const { return out_; } diff --git a/include/fmt/core.h b/include/fmt/core.h index 304b1f1d6eed9..8c487b5510249 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -217,6 +217,12 @@ # endif #endif +#ifdef _MSC_VER +# define FMT_UNCHECKED_TYPE _Unchecked_type +#else +# define FMT_UNCHECKED_TYPE DummyName +#endif + #ifndef FMT_BEGIN_NAMESPACE # define FMT_BEGIN_NAMESPACE \ namespace fmt { \ @@ -1498,7 +1504,7 @@ class appender : public std::back_insert_iterator> { public: using std::back_insert_iterator>::back_insert_iterator; appender(base it) noexcept : base(it) {} - using _Unchecked_type = appender; // Mark iterator as checked. + using FMT_UNCHECKED_TYPE = appender; // Mark iterator as checked. auto operator++() noexcept -> appender& { return *this; } diff --git a/include/fmt/format.h b/include/fmt/format.h index d71715498d8c3..4c01ecbdc723a 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1848,7 +1848,7 @@ class counting_iterator { using difference_type = std::ptrdiff_t; using pointer = void; using reference = void; - using _Unchecked_type = counting_iterator; // Mark iterator as checked. + using FMT_UNCHECKED_TYPE = counting_iterator; // Mark iterator as checked. struct value_type { template void operator=(const T&) {}