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
97cc8893
Commit
97cc8893
authored
6 years ago
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround a visit lookup issue in gcc 8 (#851)
parent
7110b460
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
include/fmt/format.h
include/fmt/format.h
+7
-6
No files found.
include/fmt/format.h
View file @
97cc8893
...
...
@@ -1825,7 +1825,7 @@ template <template <typename> class Handler, typename T,
typename
Context
,
typename
ErrorHandler
>
FMT_CONSTEXPR
void
set_dynamic_spec
(
T
&
value
,
basic_format_arg
<
Context
>
arg
,
ErrorHandler
eh
)
{
unsigned
long
long
big_value
=
visit
(
Handler
<
ErrorHandler
>
(
eh
),
arg
);
unsigned
long
long
big_value
=
fmt
::
visit
(
Handler
<
ErrorHandler
>
(
eh
),
arg
);
if
(
big_value
>
(
std
::
numeric_limits
<
int
>::
max
)())
eh
.
on_error
(
"number is too big"
);
value
=
static_cast
<
T
>
(
big_value
);
...
...
@@ -1839,7 +1839,8 @@ class specs_handler: public specs_setter<typename Context::char_type> {
public:
typedef
typename
Context
::
char_type
char_type
;
FMT_CONSTEXPR
specs_handler
(
basic_format_specs
<
char_type
>
&
specs
,
Context
&
ctx
)
FMT_CONSTEXPR
specs_handler
(
basic_format_specs
<
char_type
>
&
specs
,
Context
&
ctx
)
:
specs_setter
<
char_type
>
(
specs
),
context_
(
ctx
)
{}
template
<
typename
Id
>
...
...
@@ -3343,14 +3344,14 @@ struct format_handler : internal::error_handler {
void
on_replacement_field
(
const
Char
*
p
)
{
context
.
parse_context
().
advance_to
(
p
);
if
(
!
visit
(
internal
::
custom_formatter
<
Char
,
Context
>
(
context
),
arg
))
context
.
advance_to
(
visit
(
ArgFormatter
(
context
),
arg
));
if
(
!
fmt
::
visit
(
internal
::
custom_formatter
<
Char
,
Context
>
(
context
),
arg
))
context
.
advance_to
(
fmt
::
visit
(
ArgFormatter
(
context
),
arg
));
}
iterator
on_format_specs
(
iterator
it
)
{
auto
&
parse_ctx
=
context
.
parse_context
();
parse_ctx
.
advance_to
(
pointer_from
(
it
));
if
(
visit
(
internal
::
custom_formatter
<
Char
,
Context
>
(
context
),
arg
))
if
(
fmt
::
visit
(
internal
::
custom_formatter
<
Char
,
Context
>
(
context
),
arg
))
return
iterator
(
parse_ctx
);
basic_format_specs
<
Char
>
specs
;
using
internal
::
specs_handler
;
...
...
@@ -3360,7 +3361,7 @@ struct format_handler : internal::error_handler {
if
(
*
it
!=
'}'
)
on_error
(
"missing '}' in format string"
);
parse_ctx
.
advance_to
(
pointer_from
(
it
));
context
.
advance_to
(
visit
(
ArgFormatter
(
context
,
&
specs
),
arg
));
context
.
advance_to
(
fmt
::
visit
(
ArgFormatter
(
context
,
&
specs
),
arg
));
return
it
;
}
...
...
This diff is collapsed.
Click to expand it.
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