Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
4eb97fa4
Commit
4eb97fa4
authored
Sep 05, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce code bloat
parent
6b55c832
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
include/fmt/format.h
include/fmt/format.h
+15
-7
No files found.
include/fmt/format.h
View file @
4eb97fa4
...
@@ -1611,14 +1611,21 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
...
@@ -1611,14 +1611,21 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
}
}
return
out
;
return
out
;
}
}
template
<
typename
Char
,
typename
OutputIt
,
typename
T
>
FMT_CONSTEXPR
FMT_NOINLINE
auto
write_int_noinline
(
OutputIt
out
,
write_int_arg
<
T
>
arg
,
const
basic_format_specs
<
Char
>&
specs
,
locale_ref
loc
)
->
OutputIt
{
return
write_int
(
out
,
arg
,
specs
,
loc
);
}
template
<
typename
Char
,
typename
OutputIt
,
typename
T
,
template
<
typename
Char
,
typename
OutputIt
,
typename
T
,
FMT_ENABLE_IF
(
is_integral
<
T
>
::
value
&&
FMT_ENABLE_IF
(
is_integral
<
T
>
::
value
&&
!
std
::
is_same
<
T
,
bool
>::
value
&&
!
std
::
is_same
<
T
,
bool
>::
value
&&
std
::
is_same
<
OutputIt
,
buffer_appender
<
Char
>>::
value
)
>
std
::
is_same
<
OutputIt
,
buffer_appender
<
Char
>>::
value
)
>
FMT_CONSTEXPR
auto
write
(
OutputIt
out
,
T
value
,
FMT_CONSTEXPR
FMT_INLINE
auto
write
(
OutputIt
out
,
T
value
,
const
basic_format_specs
<
Char
>&
specs
,
locale_ref
loc
)
const
basic_format_specs
<
Char
>&
specs
,
->
OutputIt
{
locale_ref
loc
)
->
OutputIt
{
return
write_int
(
out
,
make_write_int_arg
(
value
,
specs
.
sign
),
specs
,
loc
);
return
write_int_noinline
(
out
,
make_write_int_arg
(
value
,
specs
.
sign
),
specs
,
loc
);
}
}
// An inlined version of write used in format string compilation.
// An inlined version of write used in format string compilation.
template
<
typename
Char
,
typename
OutputIt
,
typename
T
,
template
<
typename
Char
,
typename
OutputIt
,
typename
T
,
...
@@ -2634,14 +2641,15 @@ template <typename T> struct formatter<group_digits_view<T>> : formatter<T> {
...
@@ -2634,14 +2641,15 @@ template <typename T> struct formatter<group_digits_view<T>> : formatter<T> {
}
}
template
<
typename
FormatContext
>
template
<
typename
FormatContext
>
auto
format
(
group_digits_view
<
T
>
t
,
FormatContext
&
ctx
)
->
decltype
(
ctx
.
out
())
{
auto
format
(
group_digits_view
<
T
>
t
,
FormatContext
&
ctx
)
->
decltype
(
ctx
.
out
())
{
detail
::
handle_dynamic_spec
<
detail
::
width_checker
>
(
specs_
.
width
,
detail
::
handle_dynamic_spec
<
detail
::
width_checker
>
(
specs_
.
width
,
specs_
.
width_ref
,
ctx
);
specs_
.
width_ref
,
ctx
);
detail
::
handle_dynamic_spec
<
detail
::
precision_checker
>
(
detail
::
handle_dynamic_spec
<
detail
::
precision_checker
>
(
specs_
.
precision
,
specs_
.
precision_ref
,
ctx
);
specs_
.
precision
,
specs_
.
precision_ref
,
ctx
);
return
detail
::
write_int_localized
(
return
detail
::
write_int_localized
(
ctx
.
out
(),
static_cast
<
detail
::
uint64_or_128_t
<
T
>>
(
t
.
value
),
0
,
ctx
.
out
(),
static_cast
<
detail
::
uint64_or_128_t
<
T
>>
(
t
.
value
),
0
,
specs_
,
specs_
,
detail
::
digit_grouping
<
char
>
({
"
\3
"
,
','
}));
detail
::
digit_grouping
<
char
>
({
"
\3
"
,
','
}));
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment