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
712abe40
Commit
712abe40
authored
Oct 04, 2020
by
Victor Zverovich
Committed by
Victor Zverovich
Oct 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround a bug in gcc 7.5 (#1912)
Thanks Martin Janzen.
parent
af8a180a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
include/fmt/core.h
include/fmt/core.h
+4
-2
No files found.
include/fmt/core.h
View file @
712abe40
...
@@ -910,7 +910,8 @@ template <typename Char> struct named_arg_info {
...
@@ -910,7 +910,8 @@ template <typename Char> struct named_arg_info {
template
<
typename
T
,
typename
Char
,
size_t
NUM_ARGS
,
size_t
NUM_NAMED_ARGS
>
template
<
typename
T
,
typename
Char
,
size_t
NUM_ARGS
,
size_t
NUM_NAMED_ARGS
>
struct
arg_data
{
struct
arg_data
{
// args_[0].named_args points to named_args_ to avoid bloating format_args.
// args_[0].named_args points to named_args_ to avoid bloating format_args.
T
args_
[
1
+
(
NUM_ARGS
!=
0
?
NUM_ARGS
:
1
)];
// +1 to workaround a bug in gcc 7.5 that causes duplicated-branches warning.
T
args_
[
1
+
(
NUM_ARGS
!=
0
?
NUM_ARGS
:
+
1
)];
named_arg_info
<
Char
>
named_args_
[
NUM_NAMED_ARGS
];
named_arg_info
<
Char
>
named_args_
[
NUM_NAMED_ARGS
];
template
<
typename
...
U
>
template
<
typename
...
U
>
...
@@ -922,7 +923,8 @@ struct arg_data {
...
@@ -922,7 +923,8 @@ struct arg_data {
template
<
typename
T
,
typename
Char
,
size_t
NUM_ARGS
>
template
<
typename
T
,
typename
Char
,
size_t
NUM_ARGS
>
struct
arg_data
<
T
,
Char
,
NUM_ARGS
,
0
>
{
struct
arg_data
<
T
,
Char
,
NUM_ARGS
,
0
>
{
T
args_
[
NUM_ARGS
!=
0
?
NUM_ARGS
:
1
];
// +1 to workaround a bug in gcc 7.5 that causes duplicated-branches warning.
T
args_
[
NUM_ARGS
!=
0
?
NUM_ARGS
:
+
1
];
template
<
typename
...
U
>
template
<
typename
...
U
>
FMT_INLINE
arg_data
(
const
U
&
...
init
)
:
args_
{
init
...}
{}
FMT_INLINE
arg_data
(
const
U
&
...
init
)
:
args_
{
init
...}
{}
...
...
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