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
d4366505
Commit
d4366505
authored
Sep 19, 2018
by
medithe
Committed by
Victor Zverovich
Sep 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround visit lookup issues in printf.h on gcc
parent
894b6fac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
include/fmt/printf.h
include/fmt/printf.h
+6
-6
No files found.
include/fmt/printf.h
View file @
d4366505
...
@@ -133,7 +133,7 @@ class arg_converter: public function<void> {
...
@@ -133,7 +133,7 @@ class arg_converter: public function<void> {
// unsigned).
// unsigned).
template
<
typename
T
,
typename
Context
,
typename
Char
>
template
<
typename
T
,
typename
Context
,
typename
Char
>
void
convert_arg
(
basic_format_arg
<
Context
>
&
arg
,
Char
type
)
{
void
convert_arg
(
basic_format_arg
<
Context
>
&
arg
,
Char
type
)
{
visit
(
arg_converter
<
T
,
Context
>
(
arg
,
type
),
arg
);
fmt
::
visit
(
arg_converter
<
T
,
Context
>
(
arg
,
type
),
arg
);
}
}
// Converts an integer argument to char for printf.
// Converts an integer argument to char for printf.
...
@@ -454,7 +454,7 @@ unsigned basic_printf_context<OutputIt, Char, AF>::parse_header(
...
@@ -454,7 +454,7 @@ unsigned basic_printf_context<OutputIt, Char, AF>::parse_header(
}
else
if
(
*
it
==
'*'
)
{
}
else
if
(
*
it
==
'*'
)
{
++
it
;
++
it
;
spec
.
width_
=
spec
.
width_
=
visit
(
internal
::
printf_width_handler
<
char_type
>
(
spec
),
get_arg
(
it
));
fmt
::
visit
(
internal
::
printf_width_handler
<
char_type
>
(
spec
),
get_arg
(
it
));
}
}
return
arg_index
;
return
arg_index
;
}
}
...
@@ -490,14 +490,14 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
...
@@ -490,14 +490,14 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
}
else
if
(
*
it
==
'*'
)
{
}
else
if
(
*
it
==
'*'
)
{
++
it
;
++
it
;
spec
.
precision_
=
spec
.
precision_
=
visit
(
internal
::
printf_precision_handler
(),
get_arg
(
it
));
fmt
::
visit
(
internal
::
printf_precision_handler
(),
get_arg
(
it
));
}
else
{
}
else
{
spec
.
precision_
=
0
;
spec
.
precision_
=
0
;
}
}
}
}
format_arg
arg
=
get_arg
(
it
,
arg_index
);
format_arg
arg
=
get_arg
(
it
,
arg_index
);
if
(
spec
.
flag
(
HASH_FLAG
)
&&
visit
(
internal
::
is_zero_int
(),
arg
))
if
(
spec
.
flag
(
HASH_FLAG
)
&&
fmt
::
visit
(
internal
::
is_zero_int
(),
arg
))
spec
.
flags_
&=
~
internal
::
to_unsigned
<
int
>
(
HASH_FLAG
);
spec
.
flags_
&=
~
internal
::
to_unsigned
<
int
>
(
HASH_FLAG
);
if
(
spec
.
fill_
==
'0'
)
{
if
(
spec
.
fill_
==
'0'
)
{
if
(
arg
.
is_arithmetic
())
if
(
arg
.
is_arithmetic
())
...
@@ -551,7 +551,7 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
...
@@ -551,7 +551,7 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
break
;
break
;
case
'c'
:
case
'c'
:
// TODO: handle wchar_t better?
// TODO: handle wchar_t better?
visit
(
internal
::
char_converter
<
basic_printf_context
>
(
arg
),
arg
);
fmt
::
visit
(
internal
::
char_converter
<
basic_printf_context
>
(
arg
),
arg
);
break
;
break
;
}
}
}
}
...
@@ -559,7 +559,7 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
...
@@ -559,7 +559,7 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
start
=
it
;
start
=
it
;
// Format argument.
// Format argument.
visit
(
AF
(
buffer
,
spec
,
*
this
),
arg
);
fmt
::
visit
(
AF
(
buffer
,
spec
,
*
this
),
arg
);
}
}
buffer
.
append
(
pointer_from
(
start
),
pointer_from
(
it
));
buffer
.
append
(
pointer_from
(
start
),
pointer_from
(
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