Skip to content

Commit

Permalink
modules missing pieces
Browse files Browse the repository at this point in the history
- don't export names from `detail`
- put more headers into the global module fragment
- support MSYS2 and Clang
  • Loading branch information
DanielaE committed Apr 23, 2023
1 parent eafcd3c commit ed407d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,10 +1039,10 @@ template <typename T, size_t SIZE, typename Allocator>
struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type {
};

namespace detail {
FMT_BEGIN_DETAIL_NAMESPACE
FMT_API bool write_console(std::FILE* f, string_view text);
FMT_API void print(std::FILE*, string_view);
} // namespace detail
FMT_END_DETAIL_NAMESPACE

// Suppress a misleading warning in older versions of clang.
#if FMT_CLANG_VERSION
Expand Down
12 changes: 11 additions & 1 deletion src/fmt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ module;
#include <system_error>
#include <thread>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <variant>
#include <vector>
#include <version>

#if _MSC_VER
#if __has_include(<cxxabi.h>)
# include <cxxabi.h>
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <intrin.h>
#endif
#if defined __APPLE__ || defined(__FreeBSD__)
Expand All @@ -56,6 +60,12 @@ module;
# endif
#endif
#ifdef _WIN32
# if defined(__GLIBCXX__)
# include <ext/stdio_filebuf.h>
# include <ext/stdio_sync_filebuf.h>
# elif defined(_LIBCPP_VERSION)
# include <__std_stream>
# endif
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
Expand Down

0 comments on commit ed407d8

Please sign in to comment.