mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Remove an ostream hack incompatible with libc++ 17
This commit is contained in:
@ -13,8 +13,6 @@
|
|||||||
#if defined(_WIN32) && defined(__GLIBCXX__)
|
#if defined(_WIN32) && defined(__GLIBCXX__)
|
||||||
# include <ext/stdio_filebuf.h>
|
# include <ext/stdio_filebuf.h>
|
||||||
# include <ext/stdio_sync_filebuf.h>
|
# include <ext/stdio_sync_filebuf.h>
|
||||||
#elif defined(_WIN32) && defined(_LIBCPP_VERSION)
|
|
||||||
# include <__std_stream>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
@ -37,10 +35,6 @@ class file_access {
|
|||||||
template class file_access<file_access_tag, std::filebuf,
|
template class file_access<file_access_tag, std::filebuf,
|
||||||
&std::filebuf::_Myfile>;
|
&std::filebuf::_Myfile>;
|
||||||
auto get_file(std::filebuf&) -> FILE*;
|
auto get_file(std::filebuf&) -> FILE*;
|
||||||
#elif defined(_WIN32) && defined(_LIBCPP_VERSION)
|
|
||||||
template class file_access<file_access_tag, std::__stdoutbuf<char>,
|
|
||||||
&std::__stdoutbuf<char>::__file_>;
|
|
||||||
auto get_file(std::__stdoutbuf<char>&) -> FILE*;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) {
|
inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) {
|
||||||
@ -57,9 +51,6 @@ inline bool write_ostream_unicode(std::ostream& os, fmt::string_view data) {
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
if (c_file) return write_console(c_file, data);
|
if (c_file) return write_console(c_file, data);
|
||||||
#elif defined(_WIN32) && defined(_LIBCPP_VERSION)
|
|
||||||
if (auto* buf = dynamic_cast<std::__stdoutbuf<char>*>(os.rdbuf()))
|
|
||||||
if (FILE* f = get_file(*buf)) return write_console(f, data);
|
|
||||||
#else
|
#else
|
||||||
ignore_unused(os, data);
|
ignore_unused(os, data);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user