aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__format/format_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__format/format_string.h')
-rw-r--r--libcxx/include/__format/format_string.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h
index 51c3c7a1a6d8..d9caf866a17d 100644
--- a/libcxx/include/__format/format_string.h
+++ b/libcxx/include/__format/format_string.h
@@ -33,6 +33,9 @@ struct _LIBCPP_TEMPLATE_VIS __parse_number_result {
};
template <class _CharT>
+__parse_number_result(const _CharT*, uint32_t) -> __parse_number_result<_CharT>;
+
+template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
__parse_number(const _CharT* __begin, const _CharT* __end);
@@ -70,7 +73,7 @@ __parse_automatic(const _CharT* __begin, const _CharT*, auto& __parse_ctx) {
template <class _CharT>
_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
__parse_manual(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
- __parse_number_result<_CharT> __r = __parse_number(__begin, __end);
+ __parse_number_result<_CharT> __r = __format::__parse_number(__begin, __end);
__parse_ctx.check_arg_id(__r.__value);
return __r;
}
@@ -117,7 +120,7 @@ __parse_number(const _CharT* __begin, const _CharT* __end_input) {
if (__v > __number_max ||
(__begin != __end_input && *__begin >= _CharT('0') &&
*__begin <= _CharT('9')))
- __throw_format_error("The numeric value of the format-spec is too large");
+ std::__throw_format_error("The numeric value of the format-spec is too large");
__value = __v;
}
@@ -146,8 +149,7 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
return __detail::__parse_automatic(__begin, __end, __parse_ctx);
}
if (*__begin < _CharT('0') || *__begin > _CharT('9'))
- __throw_format_error(
- "The arg-id of the format-spec starts with an invalid character");
+ std::__throw_format_error("The arg-id of the format-spec starts with an invalid character");
return __detail::__parse_manual(__begin, __end, __parse_ctx);
}