Skip to content

Commit

Permalink
Workaround a bug in Apple LLVM version 4.2 of clang (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Feb 23, 2016
1 parent f64ea62 commit 209748f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cppformat/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,13 @@ struct ArgArray<N, true/*IsPacked*/> {
typedef Value Type[N > 0 ? N : 1];

template <typename Formatter, typename T>
static Value make(const T &value) { return MakeValue<Formatter>(value); }
static Value make(const T &value) {
Value result = MakeValue<Formatter>(value);
// Workaround a bug in Apple LLVM version 4.2 (clang-425.0.28) of clang:
// https://github.com/cppformat/cppformat/issues/276
(void)result.custom.format;
return result;
}
};

template <unsigned N>
Expand Down

0 comments on commit 209748f

Please sign in to comment.