mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Fix compilation with intel compilers (ICC/ICPC) v14.0
This commit is contained in:
committed by
Victor Zverovich
parent
4cf21f58b2
commit
e864acfdbd
@ -89,7 +89,8 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FMT_HAS_FEATURE(cxx_explicit_conversions) || FMT_MSC_VER >= 1800
|
#if FMT_HAS_FEATURE(cxx_explicit_conversions) || \
|
||||||
|
FMT_GCC_VERSION >= 405 || FMT_MSC_VER >= 1800
|
||||||
# define FMT_EXPLICIT explicit
|
# define FMT_EXPLICIT explicit
|
||||||
#else
|
#else
|
||||||
# define FMT_EXPLICIT
|
# define FMT_EXPLICIT
|
||||||
|
@ -2164,7 +2164,8 @@ FMT_CONSTEXPR void parse_format_string(
|
|||||||
}
|
}
|
||||||
Handler &handler_;
|
Handler &handler_;
|
||||||
} write{handler};
|
} write{handler};
|
||||||
auto begin = format_str.data(), end = begin + format_str.size();
|
auto begin = format_str.data();
|
||||||
|
auto end = begin + format_str.size();
|
||||||
while (begin != end) {
|
while (begin != end) {
|
||||||
// Doing two passes with memchr (one for '{' and another for '}') is up to
|
// Doing two passes with memchr (one for '{' and another for '}') is up to
|
||||||
// 2.5x faster than the naive one-pass implementation on big format strings.
|
// 2.5x faster than the naive one-pass implementation on big format strings.
|
||||||
|
@ -1583,7 +1583,7 @@ struct explicitly_convertible_to_string_like {
|
|||||||
typename String,
|
typename String,
|
||||||
typename = typename std::enable_if<
|
typename = typename std::enable_if<
|
||||||
std::is_constructible<String, const char*, std::size_t>::value>::type>
|
std::is_constructible<String, const char*, std::size_t>::value>::type>
|
||||||
explicit operator String() const { return String("foo", 3u); }
|
FMT_EXPLICIT operator String() const { return String("foo", 3u); }
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST(FormatterTest, FormatExplicitlyConvertibleToStringLike) {
|
TEST(FormatterTest, FormatExplicitlyConvertibleToStringLike) {
|
||||||
|
Reference in New Issue
Block a user