diff --git a/doc/build.py b/doc/build.py index 5947e465..e95175f5 100755 --- a/doc/build.py +++ b/doc/build.py @@ -92,7 +92,8 @@ def build_docs(version='dev', **kwargs): FMT_API= \ "FMT_BEGIN_NAMESPACE=namespace fmt {{" \ "FMT_END_NAMESPACE=}}" \ - "FMT_STRING_ALIAS=1" + "FMT_STRING_ALIAS=1" \ + "FMT_CHAR(S)=char_t" EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str '''.format(include_dir, doxyxml_dir).encode('UTF-8')) if p.returncode != 0: diff --git a/include/fmt/core.h b/include/fmt/core.h index 88798142..d880e8ad 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -505,8 +505,6 @@ struct is_format_string : std::is_empty> {}; template struct is_compile_string : std::is_base_of {}; -#define FMT_CHAR(Str) typename internal::format_string_traits::char_type - template struct named_arg_base; @@ -1246,6 +1244,14 @@ struct wformat_args : basic_format_args { : basic_format_args(std::forward(arg)...) {} }; +#if FMT_HAS_FEATURE(cxx_alias_templates) +template +using char_t = typename internal::format_string_traits::char_type; +#define FMT_CHAR(S) char_t +#else +#define FMT_CHAR(S) typename internal::format_string_traits::char_type +#endif + namespace internal { template struct named_arg_base {