Skip to content

Commit

Permalink
Backport a -Wsign-compare fix for ArrayAsVector
Browse files Browse the repository at this point in the history
This fixes the build with newer versions of gcc.

Obtained from: [google/googletest#2723](google/googletest#2723)
Submitted-by: [Johan Mabille](https://github.com/JohanMabille)
  • Loading branch information
ngie-eign committed Apr 9, 2020
1 parent 05a5dde commit 4d6db21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/googletest/src/gtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,7 @@ static const char* const kReservedOutputTestCaseAttributes[] = {
"classname", "name", "status", "time", "type_param",
"value_param", "file", "line", "result", "timestamp"};

template <int kSize>
template <size_t kSize>
std::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {
return std::vector<std::string>(array, array + kSize);
}
Expand Down

0 comments on commit 4d6db21

Please sign in to comment.