Skip to content

Commit c1efde7

Browse files
Adjust templatization
1 parent 32c612a commit c1efde7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

stl/inc/__msvc_formatter.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ _NODISCARD _FormatContext::iterator _Fill_align_and_width_formatter_format(_Form
421421
template <class _CharT>
422422
struct _Fill_align_and_width_formatter {
423423
public:
424-
_NODISCARD constexpr auto _Parse(basic_format_parse_context<_CharT>& _Parse_ctx) {
424+
template <class _ParserContext = basic_format_parse_context<_CharT>> // improves throughput, see GH-5003
425+
_NODISCARD constexpr _ParserContext::iterator _Parse(type_identity_t<_ParserContext&> _Parse_ctx) {
425426
return _STD _Fill_align_and_width_formatter_parse(_Specs, _Parse_ctx);
426427
}
427428

stl/inc/stacktrace

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ ostream& operator<<(ostream& _Os, const basic_stacktrace<_Alloc>& _St) {
341341

342342
template <>
343343
struct formatter<stacktrace_entry> {
344-
template <class _ParseContext = format_parse_context> // improves throughput, see GH-5003
345-
constexpr _ParseContext::iterator parse(type_identity_t<_ParseContext&> _Parse_ctx) {
344+
template <class _ParserContext = format_parse_context> // improves throughput, see GH-5003
345+
constexpr _ParserContext::iterator parse(type_identity_t<_ParserContext&> _Parse_ctx) {
346346
return _Impl._Parse(_Parse_ctx);
347347
}
348348

@@ -362,8 +362,7 @@ inline constexpr bool enable_nonlocking_formatter_optimization<stacktrace_entry>
362362

363363
template <class _Alloc>
364364
struct formatter<basic_stacktrace<_Alloc>> {
365-
template <class _ParseContext = format_parse_context> // improves throughput, see GH-5003
366-
constexpr _ParseContext::iterator parse(type_identity_t<_ParseContext&> _Parse_ctx) {
365+
constexpr format_parse_context::iterator parse(format_parse_context& _Parse_ctx) {
367366
const auto _First = _Parse_ctx.begin();
368367
if (_First != _Parse_ctx.end() && *_First != '}') {
369368
_Throw_format_error("For formatter<basic_stacktrace<Allocator>>, format-spec must be empty.");

0 commit comments

Comments
 (0)