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
236fea1f
Commit
236fea1f
authored
Oct 27, 2020
by
Владислав Щапов
Committed by
Victor Zverovich
Nov 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround bugs in gcc 8
parent
4fe0b111
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
23 deletions
+25
-23
include/fmt/color.h
include/fmt/color.h
+5
-4
include/fmt/compile.h
include/fmt/compile.h
+8
-8
include/fmt/core.h
include/fmt/core.h
+8
-7
include/fmt/locale.h
include/fmt/locale.h
+4
-4
No files found.
include/fmt/color.h
View file @
236fea1f
...
...
@@ -589,10 +589,11 @@ OutputIt vformat_to(
\endrst
*/
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
&&
detail
::
is_string
<
S
>::
value
)
>
inline
OutputIt
format_to
(
OutputIt
out
,
const
text_style
&
ts
,
const
S
&
format_str
,
Args
&&
...
args
)
{
bool
enable
=
(
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
&&
detail
::
is_string
<
S
>::
value
)
>
inline
auto
format_to
(
OutputIt
out
,
const
text_style
&
ts
,
const
S
&
format_str
,
Args
&&
...
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
return
vformat_to
(
out
,
ts
,
to_string_view
(
format_str
),
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...));
}
...
...
include/fmt/compile.h
View file @
236fea1f
...
...
@@ -667,14 +667,14 @@ OutputIt format_to(OutputIt out, const S&, const Args&... args) {
return
format_to
(
out
,
compiled
,
args
...);
}
template
<
typename
OutputIt
,
typename
CompiledFormat
,
typename
...
Args
,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
typename
CompiledFormat
::
char_type
>
::
value
&&
std
::
is_base_of
<
detail
::
basic_compiled_format
,
CompiledFormat
>::
value
)
>
format_to_n_result
<
OutputIt
>
format_to_n
(
OutputIt
out
,
size_t
n
,
const
CompiledFormat
&
cf
,
const
Args
&
...
args
)
{
template
<
typename
OutputIt
,
typename
CompiledFormat
,
typename
...
Args
>
typename
std
::
enable_if
<
(
detail
::
is_output_iterator
<
OutputIt
,
typename
CompiledFormat
::
char_type
>::
value
&&
std
::
is_base_of
<
detail
::
basic_compiled_format
,
CompiledFormat
>::
value
),
format_to_n_result
<
OutputIt
>
>::
type
format_to_n
(
OutputIt
out
,
size_t
n
,
const
CompiledFormat
&
cf
,
const
Args
&
...
args
)
{
auto
it
=
format_to
(
detail
::
truncating_iterator
<
OutputIt
>
(
out
,
n
),
cf
,
args
...);
return
{
it
.
base
(),
it
.
count
()};
...
...
include/fmt/core.h
View file @
236fea1f
...
...
@@ -1968,10 +1968,11 @@ inline void vprint_mojibake(std::FILE*, string_view, format_args) {}
// GCC 8 and earlier cannot handle std::back_insert_iterator<Container> with
// vformat_to<ArgFormatter>(...) overload, so SFINAE on iterator type instead.
template
<
typename
OutputIt
,
typename
S
,
typename
Char
=
char_t
<
S
>,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
value
)
>
OutputIt
vformat_to
(
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
value
>
auto
vformat_to
(
OutputIt
out
,
const
S
&
format_str
,
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>>
args
)
{
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>>
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
decltype
(
detail
::
get_buffer
<
Char
>
(
out
))
buf
(
detail
::
get_buffer_init
(
out
));
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
args
);
return
detail
::
get_iterator
(
buf
);
...
...
@@ -2023,10 +2024,10 @@ inline format_to_n_result<OutputIt> vformat_to_n(
\endrst
*/
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
)
>
inline
format_to_n_result
<
OutputIt
>
format_to_n
(
OutputIt
out
,
size_t
n
,
const
S
&
format_str
,
const
Args
&
...
args
)
{
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
>
inline
auto
format_to_n
(
OutputIt
out
,
size_t
n
,
const
S
&
format_str
,
const
Args
&
...
args
)
->
typename
std
::
enable_if
<
enable
,
format_to_n_result
<
OutputIt
>>::
type
{
const
auto
&
vargs
=
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...);
return
vformat_to_n
(
out
,
n
,
to_string_view
(
format_str
),
vargs
);
}
...
...
include/fmt/locale.h
View file @
236fea1f
...
...
@@ -51,10 +51,10 @@ inline OutputIt vformat_to(
}
template
<
typename
OutputIt
,
typename
S
,
typename
...
Args
,
typename
Char
=
char_t
<
S
>,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
value
)
>
inline
OutputIt
format_to
(
OutputIt
out
,
const
std
::
locale
&
loc
,
const
S
&
format_str
,
Args
&&
...
args
)
{
bool
enable
=
detail
::
is_output_iterator
<
OutputIt
,
char_t
<
S
>
>::
value
>
inline
auto
format_to
(
OutputIt
out
,
const
std
::
locale
&
loc
,
const
S
&
format_str
,
Args
&&
...
args
)
->
typename
std
::
enable_if
<
enable
,
OutputIt
>::
type
{
const
auto
&
vargs
=
fmt
::
make_args_checked
<
Args
...
>
(
format_str
,
args
...);
return
vformat_to
(
out
,
loc
,
to_string_view
(
format_str
),
vargs
);
}
...
...
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