Skip to content

Commit

Permalink
Fix a bogus -Wduplicated-branches gcc warning (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut authored Sep 28, 2017
1 parent 2a619d9 commit 5d62655
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,8 @@ struct ArgArray;

template <std::size_t N>
struct ArgArray<N, true/*IsPacked*/> {
typedef Value Type[N > 0 ? N : 1];
// '+' is used to silence GCC -Wduplicated-branches warning.
typedef Value Type[N > 0 ? N : +1];

template <typename Formatter, typename T>
static Value make(const T &value) {
Expand Down

0 comments on commit 5d62655

Please sign in to comment.