Without this qualification I have this in _GLIBCXX_INLINE_VERSION mode:
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649:
note: candidate: 'template<class _CharT> bool std::__9::isxdigit(_CharT,
const locale&)'
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649:
note: template argument deduction/substitution failed:
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1540:
note: candidate expects 2 arguments, 1 provided
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630:
error: no matching function for call to 'isxdigit(const
std::__9::basic_string_view<char>::value_type&)'
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649:
note: candidate: 'template<class _CharT> bool std::__9::isxdigit(_CharT,
const locale&)'
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649:
note: template argument deduction/substitution failed:
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630:
note: candidate expects 2 arguments, 1 provided
compiler exited with status 1
FAIL: 17_intro/headers/c++2020/all_attributes.cc (test for excess errors)
Excess errors:
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1540:
error: no matching function for call to 'isxdigit(const
std::__9::basic_string_view<char>::value_type&)'
/home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630:
error: no matching function for call to 'isxdigit(const
std::__9::basic_string_view<char>::value_type&)'
It sounds like the most reasonable fix as this is how toupper is being
called.
libstdc++: Add missing std qualification on isxdigit calls
libstdc++-v3/ChangeLog
* include/std/format: Add std qualification on isxdigit calls.
Ok to commit ?
François
diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format
index f4fc85a16d2..9f5b7bee2be 100644
--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -1537,7 +1537,7 @@ namespace __format
if (__trailing_zeros)
{
- if (!isxdigit(__s[0]))
+ if (!std::isxdigit(__s[0]))
--__sigfigs;
__z = __prec - __sigfigs;
}
@@ -1627,7 +1627,7 @@ namespace __format
{
__fill_char = _CharT('0');
// Write sign before zero filling.
- if (!isxdigit(__narrow_str[0]))
+ if (!std::isxdigit(__narrow_str[0]))
{
*__out++ = __str[0];
__str.remove_prefix(1);