add support for statically named arguments with FMT_STRING

This commit is contained in:
Alexey Ochapov
2021-05-13 03:57:07 +03:00
committed by Victor Zverovich
parent ea94d6d93c
commit 54f22a3eef
4 changed files with 67 additions and 31 deletions

View File

@@ -255,16 +255,6 @@ inline int ctzll(uint64_t x) {
FMT_END_NAMESPACE
#endif
#ifndef FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
# if defined(__cpp_nontype_template_args) && \
((FMT_GCC_VERSION >= 903 && __cplusplus >= 201709L) || \
__cpp_nontype_template_args >= 201911L)
# define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 1
# else
# define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 0
# endif
#endif
FMT_BEGIN_NAMESPACE
namespace detail {
@@ -3226,9 +3216,6 @@ template <typename Char> struct udl_formatter {
}
};
template <typename T, typename = void>
struct is_statically_named_arg : std::false_type {};
# if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
template <typename T, typename Char, size_t N, fixed_string<Char, N> Str>
struct statically_named_arg : view {