mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-24 11:20:11 +01:00
Fix module fmt::join<string_view> (#4577)
FMT_USE_STRING_VIEW define was incorrectly not being defined when using modules, so there was no appropriate formatter specialization for std::string_view Fixes #4379
This commit is contained in:
@@ -40,6 +40,12 @@
|
||||
|
||||
#include "base.h"
|
||||
|
||||
// libc++ supports string_view in pre-c++17.
|
||||
#if FMT_HAS_INCLUDE(<string_view>) && \
|
||||
(FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
|
||||
# define FMT_USE_STRING_VIEW
|
||||
#endif
|
||||
|
||||
#ifndef FMT_MODULE
|
||||
# include <stdlib.h> // malloc, free
|
||||
|
||||
@@ -62,11 +68,8 @@
|
||||
# include <bit> // std::bit_cast
|
||||
# endif
|
||||
|
||||
// libc++ supports string_view in pre-c++17.
|
||||
# if FMT_HAS_INCLUDE(<string_view>) && \
|
||||
(FMT_CPLUSPLUS >= 201703L || defined(_LIBCPP_VERSION))
|
||||
# if defined(FMT_USE_STRING_VIEW)
|
||||
# include <string_view>
|
||||
# define FMT_USE_STRING_VIEW
|
||||
# endif
|
||||
|
||||
# if FMT_MSC_VERSION
|
||||
|
||||
Reference in New Issue
Block a user