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
fbf3b943
Commit
fbf3b943
authored
Jul 07, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround a bug in gcc
parent
a29a01d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
include/fmt/core.h
include/fmt/core.h
+6
-2
include/fmt/format.h
include/fmt/format.h
+2
-2
src/format.cc
src/format.cc
+3
-2
No files found.
include/fmt/core.h
View file @
fbf3b943
...
...
@@ -1360,6 +1360,10 @@ using buffer_context =
using
format_context
=
buffer_context
<
char
>
;
using
wformat_context
=
buffer_context
<
wchar_t
>
;
// Workaround a bug in gcc: https://stackoverflow.com/q/62767544/471164.
#define FMT_BUFFER_CONTEXT(Char) \
basic_format_context<std::back_insert_iterator<detail::buffer<Char>>, Char>
/**
\rst
An array of references to arguments. It can be implicitly converted into
...
...
@@ -1768,9 +1772,9 @@ std::basic_string<Char> vformat(
std
::
string
vformat
(
string_view
format_str
,
format_args
args
);
template
<
typename
Char
>
typename
buffer_context
<
Char
>
::
iterator
vformat_to
(
typename
FMT_BUFFER_CONTEXT
(
Char
)
::
iterator
vformat_to
(
buffer
<
Char
>&
buf
,
basic_string_view
<
Char
>
format_str
,
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>
>
args
);
basic_format_args
<
FMT_BUFFER_CONTEXT
(
type_identity_t
<
Char
>
)
>
args
);
template
<
typename
Char
,
typename
Args
,
FMT_ENABLE_IF
(
!
std
::
is_same
<
Char
,
char
>
::
value
)
>
...
...
include/fmt/format.h
View file @
fbf3b943
...
...
@@ -3482,9 +3482,9 @@ extern template int snprintf_float<long double>(long double value,
template
<
typename
S
,
typename
Char
=
char_t
<
S
>,
FMT_ENABLE_IF
(
detail
::
is_string
<
S
>::
value
)
>
inline
typename
buffer_context
<
Char
>
::
iterator
vformat_to
(
inline
typename
FMT_BUFFER_CONTEXT
(
Char
)
::
iterator
vformat_to
(
detail
::
buffer
<
Char
>&
buf
,
const
S
&
format_str
,
basic_format_args
<
buffer_context
<
type_identity_t
<
Char
>>
>
args
)
{
basic_format_args
<
FMT_BUFFER_CONTEXT
(
type_identity_t
<
Char
>
)
>
args
)
{
return
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
args
);
}
...
...
src/format.cc
View file @
fbf3b943
...
...
@@ -44,8 +44,9 @@ template FMT_API char detail::decimal_point_impl(locale_ref);
template
FMT_API
void
detail
::
buffer
<
char
>
::
append
(
const
char
*
,
const
char
*
);
template
FMT_API
format_context
::
iterator
detail
::
vformat_to
(
detail
::
buffer
<
char
>
&
,
string_view
,
basic_format_args
<
format_context
>);
template
FMT_API
FMT_BUFFER_CONTEXT
(
char
)
::
iterator
detail
::
vformat_to
(
detail
::
buffer
<
char
>&
,
string_view
,
basic_format_args
<
FMT_BUFFER_CONTEXT
(
char
)
>
);
template
FMT_API
int
detail
::
snprintf_float
(
double
,
int
,
detail
::
float_specs
,
detail
::
buffer
<
char
>
&
);
...
...
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