Improve fmt::format readability
This commit is contained in:
parent
2299032392
commit
041bf83d9b
@ -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<S>"
|
||||
EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str
|
||||
'''.format(include_dir, doxyxml_dir).encode('UTF-8'))
|
||||
if p.returncode != 0:
|
||||
|
@ -505,8 +505,6 @@ struct is_format_string : std::is_empty<format_string_traits<S>> {};
|
||||
template <typename S>
|
||||
struct is_compile_string : std::is_base_of<compile_string, S> {};
|
||||
|
||||
#define FMT_CHAR(Str) typename internal::format_string_traits<Str>::char_type
|
||||
|
||||
template <typename Char>
|
||||
struct named_arg_base;
|
||||
|
||||
@ -1246,6 +1244,14 @@ struct wformat_args : basic_format_args<wformat_context> {
|
||||
: basic_format_args<wformat_context>(std::forward<Args>(arg)...) {}
|
||||
};
|
||||
|
||||
#if FMT_HAS_FEATURE(cxx_alias_templates)
|
||||
template <typename S>
|
||||
using char_t = typename internal::format_string_traits<S>::char_type;
|
||||
#define FMT_CHAR(S) char_t<S>
|
||||
#else
|
||||
#define FMT_CHAR(S) typename internal::format_string_traits<S>::char_type
|
||||
#endif
|
||||
|
||||
namespace internal {
|
||||
template <typename Char>
|
||||
struct named_arg_base {
|
||||
|
Loading…
Reference in New Issue
Block a user