Skip to content

Commit 7c3d015

Browse files
authored
Use the _MSVC_STL_UPDATE macro to detect STL (#4267)
1 parent 7c50da5 commit 7c3d015

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/fmt/ostream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class file_access {
3535
friend auto get_file(BufType& obj) -> FILE* { return obj.*FileMemberPtr; }
3636
};
3737

38-
#if FMT_MSC_VERSION
38+
#ifdef _MSVC_STL_UPDATE
3939
template class file_access<file_access_tag, std::filebuf,
4040
&std::filebuf::_Myfile>;
4141
auto get_file(std::filebuf&) -> FILE*;
@@ -109,7 +109,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
109109
auto buffer = memory_buffer();
110110
detail::vformat_to(buffer, fmt, args);
111111
FILE* f = nullptr;
112-
#if FMT_MSC_VERSION && FMT_USE_RTTI
112+
#if defined(_MSVC_STL_UPDATE) && FMT_USE_RTTI
113113
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
114114
f = detail::get_file(*buf);
115115
#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI

0 commit comments

Comments
 (0)