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
28a8eae8
Commit
28a8eae8
authored
Oct 27, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
236fea1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
include/fmt/color.h
include/fmt/color.h
+4
-4
include/fmt/compile.h
include/fmt/compile.h
+8
-7
include/fmt/format.h
include/fmt/format.h
+7
-8
No files found.
include/fmt/color.h
View file @
28a8eae8
...
@@ -589,10 +589,10 @@ OutputIt vformat_to(
...
@@ -589,10 +589,10 @@ OutputIt vformat_to(
\endrst
\endrst
*/
*/
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
bool
enable
=
(
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
&&
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
&&
detail
::
is_string
<
S
>::
value
)
>
detail
::
is_string
<
S
>::
value
>
inline
auto
format_to
(
OutputIt
out
,
const
text_style
&
ts
,
inline
auto
format_to
(
OutputIt
out
,
const
text_style
&
ts
,
const
S
&
format_str
,
const
S
&
format_str
,
Args
&&
...
args
)
->
Args
&&
...
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
return
vformat_to
(
out
,
ts
,
to_string_view
(
format_str
),
return
vformat_to
(
out
,
ts
,
to_string_view
(
format_str
),
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...));
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...));
...
...
include/fmt/compile.h
View file @
28a8eae8
...
@@ -668,13 +668,14 @@ OutputIt format_to(OutputIt out, const S&, const Args&... args) {
...
@@ -668,13 +668,14 @@ OutputIt format_to(OutputIt out, const S&, const Args&... args) {
}
}
template
<
typename
OutputIt
,
typename
CompiledFormat
,
typename
...
Args
>
template
<
typename
OutputIt
,
typename
CompiledFormat
,
typename
...
Args
>
typename
std
::
enable_if
<
(
detail
::
is_output_iterator
<
auto
format_to_n
(
OutputIt
out
,
size_t
n
,
const
CompiledFormat
&
cf
,
OutputIt
,
typename
CompiledFormat
::
char_type
>::
value
&&
const
Args
&
...
args
)
->
std
::
is_base_of
<
detail
::
basic_compiled_format
,
typename
std
::
enable_if
<
CompiledFormat
>::
value
),
detail
::
is_output_iterator
<
OutputIt
,
format_to_n_result
<
OutputIt
>
typename
CompiledFormat
::
char_type
>::
value
&&
>::
type
format_to_n
(
OutputIt
out
,
size_t
n
,
std
::
is_base_of
<
detail
::
basic_compiled_format
,
const
CompiledFormat
&
cf
,
const
Args
&
...
args
)
{
CompiledFormat
>::
value
,
format_to_n_result
<
OutputIt
>>::
type
{
auto
it
=
auto
it
=
format_to
(
detail
::
truncating_iterator
<
OutputIt
>
(
out
,
n
),
cf
,
args
...);
format_to
(
detail
::
truncating_iterator
<
OutputIt
>
(
out
,
n
),
cf
,
args
...);
return
{
it
.
base
(),
it
.
count
()};
return
{
it
.
base
(),
it
.
count
()};
...
...
include/fmt/format.h
View file @
28a8eae8
...
@@ -3056,8 +3056,7 @@ struct format_handler : detail::error_handler {
...
@@ -3056,8 +3056,7 @@ struct format_handler : detail::error_handler {
basic_format_parse_context
<
Char
>
parse_context
;
basic_format_parse_context
<
Char
>
parse_context
;
Context
context
;
Context
context
;
format_handler
(
OutputIt
out
,
format_handler
(
OutputIt
out
,
basic_string_view
<
Char
>
str
,
basic_string_view
<
Char
>
str
,
basic_format_args
<
Context
>
format_args
,
detail
::
locale_ref
loc
)
basic_format_args
<
Context
>
format_args
,
detail
::
locale_ref
loc
)
:
parse_context
(
str
),
context
(
out
,
format_args
,
loc
)
{}
:
parse_context
(
str
),
context
(
out
,
format_args
,
loc
)
{}
...
@@ -3080,8 +3079,8 @@ struct format_handler : detail::error_handler {
...
@@ -3080,8 +3079,8 @@ struct format_handler : detail::error_handler {
FMT_INLINE
void
on_replacement_field
(
int
id
,
const
Char
*
)
{
FMT_INLINE
void
on_replacement_field
(
int
id
,
const
Char
*
)
{
auto
arg
=
get_arg
(
context
,
id
);
auto
arg
=
get_arg
(
context
,
id
);
context
.
advance_to
(
visit_format_arg
(
context
.
advance_to
(
visit_format_arg
(
default_arg_formatter
<
OutputIt
,
Char
>
{
default_arg_formatter
<
OutputIt
,
Char
>
{
context
.
out
(),
context
.
args
(),
context
.
out
(),
context
.
args
(),
context
.
locale
()},
context
.
locale
()},
arg
));
arg
));
}
}
...
@@ -3105,8 +3104,8 @@ struct format_handler : detail::error_handler {
...
@@ -3105,8 +3104,8 @@ struct format_handler : detail::error_handler {
if
(
begin
==
end
||
*
begin
!=
'}'
)
if
(
begin
==
end
||
*
begin
!=
'}'
)
on_error
(
"missing '}' in format string"
);
on_error
(
"missing '}' in format string"
);
}
}
context
.
advance_to
(
context
.
advance_to
(
visit_format_arg
(
visit_format_arg
(
arg_formatter
<
OutputIt
,
Char
>
(
context
,
&
parse_context
,
&
specs
),
arg
));
arg_formatter
<
OutputIt
,
Char
>
(
context
,
&
parse_context
,
&
specs
),
arg
));
return
begin
;
return
begin
;
}
}
};
};
...
@@ -3776,8 +3775,8 @@ void detail::vformat_to(
...
@@ -3776,8 +3775,8 @@ void detail::vformat_to(
arg
);
arg
);
return
;
return
;
}
}
format_handler
<
iterator
,
Char
,
buffer_context
<
Char
>>
h
(
format_handler
<
iterator
,
Char
,
buffer_context
<
Char
>>
h
(
out
,
format_str
,
args
,
out
,
format_str
,
args
,
loc
);
loc
);
parse_format_string
<
false
>
(
format_str
,
h
);
parse_format_string
<
false
>
(
format_str
,
h
);
}
}
...
...
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