diff --git a/include/fmt/core.h b/include/fmt/core.h index eea2ebcb..3bfab95d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1354,10 +1354,10 @@ inline auto format_as(std::byte b) -> unsigned char { template struct has_format_as { template ::value&& std::is_integral::value)> - static auto check(U*) -> std::true_type; - static auto check(...) -> std::false_type; + static auto fmt_check(U*) -> std::true_type; + static auto fmt_check(...) -> std::false_type; - enum { value = decltype(check(static_cast(nullptr)))::value }; + enum { value = decltype(fmt_check(static_cast(nullptr)))::value }; }; // Maps formatting arguments to core types. diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 2555b7e9..1e99f145 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -50,43 +50,43 @@ OutputIterator copy(wchar_t ch, OutputIterator out) { // Returns true if T has a std::string-like interface, like std::string_view. template class is_std_string_like { template - static auto check(U* p) + static auto fmt_check(U* p) -> decltype((void)p->find('a'), p->length(), (void)p->data(), int()); - template static void check(...); + template static void fmt_check(...); public: static constexpr const bool value = is_string::value || std::is_convertible>::value || - !std::is_void(nullptr))>::value; + !std::is_void(nullptr))>::value; }; template struct is_std_string_like> : std::true_type {}; template class is_map { - template static auto check(U*) -> typename U::mapped_type; - template static void check(...); + template static auto fmt_check(U*) -> typename U::mapped_type; + template static void fmt_check(...); public: #ifdef FMT_FORMAT_MAP_AS_LIST static constexpr const bool value = false; #else static constexpr const bool value = - !std::is_void(nullptr))>::value; + !std::is_void(nullptr))>::value; #endif }; template class is_set { - template static auto check(U*) -> typename U::key_type; - template static void check(...); + template static auto fmt_check(U*) -> typename U::key_type; + template static void fmt_check(...); public: #ifdef FMT_FORMAT_SET_AS_LIST static constexpr const bool value = false; #else static constexpr const bool value = - !std::is_void(nullptr))>::value && !is_map::value; + !std::is_void(nullptr))>::value && !is_map::value; #endif }; @@ -170,12 +170,12 @@ struct is_range_ // tuple_size and tuple_element check. template class is_tuple_like_ { template - static auto check(U* p) -> decltype(std::tuple_size::value, int()); - template static void check(...); + static auto fmt_check(U* p) -> decltype(std::tuple_size::value, int()); + template static void fmt_check(...); public: static constexpr const bool value = - !std::is_void(nullptr))>::value; + !std::is_void(nullptr))>::value; }; // Check for integer_sequence @@ -220,11 +220,11 @@ template class is_tuple_formattable_ { index_sequence{}, integer_sequence< bool, (is_formattable::type, - C>::value)...>{})) check(index_sequence); + C>::value)...>{})) fmt_check(index_sequence); public: static constexpr const bool value = - decltype(check(tuple_index_sequence{}))::value; + decltype(fmt_check(tuple_index_sequence{}))::value; }; template diff --git a/include/fmt/std.h b/include/fmt/std.h index ec7abaa9..12901e3c 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -123,11 +123,11 @@ template class is_variant_formattable_ { template static std::conjunction< is_formattable, C>...> - check(std::index_sequence); + fmt_check(std::index_sequence); public: static constexpr const bool value = - decltype(check(variant_index_sequence{}))::value; + decltype(fmt_check(variant_index_sequence{}))::value; }; template