modules missing pieces (#3399)

- don't export names from `detail`
- put more headers into the global module fragment
- support MSYS2 and Clang
This commit is contained in:
Daniela Engert 2023-05-05 19:21:18 +02:00 committed by GitHub
parent d8973bf16b
commit 192df93d7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -1039,10 +1039,12 @@ template <typename T, size_t SIZE, typename Allocator>
struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type { struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type {
}; };
FMT_END_EXPORT
namespace detail { namespace detail {
FMT_API bool write_console(std::FILE* f, string_view text); FMT_API bool write_console(std::FILE* f, string_view text);
FMT_API void print(std::FILE*, string_view); FMT_API void print(std::FILE*, string_view);
} // namespace detail } // namespace detail
FMT_BEGIN_EXPORT
// Suppress a misleading warning in older versions of clang. // Suppress a misleading warning in older versions of clang.
#if FMT_CLANG_VERSION #if FMT_CLANG_VERSION

View File

@ -29,12 +29,16 @@ module;
#include <system_error> #include <system_error>
#include <thread> #include <thread>
#include <type_traits> #include <type_traits>
#include <typeinfo>
#include <utility> #include <utility>
#include <variant> #include <variant>
#include <vector> #include <vector>
#include <version> #include <version>
#if _MSC_VER #if __has_include(<cxxabi.h>)
# include <cxxabi.h>
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <intrin.h> # include <intrin.h>
#endif #endif
#if defined __APPLE__ || defined(__FreeBSD__) #if defined __APPLE__ || defined(__FreeBSD__)
@ -56,6 +60,12 @@ module;
# endif # endif
#endif #endif
#ifdef _WIN32 #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 # define WIN32_LEAN_AND_MEAN
# include <windows.h> # include <windows.h>
#endif #endif