File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3737#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_FUNCTION_MOCKER_H_
3838#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_FUNCTION_MOCKER_H_
3939
40+ #include < cstddef>
4041#include < type_traits> // IWYU pragma: keep
4142#include < utility> // IWYU pragma: keep
4243
@@ -69,22 +70,22 @@ constexpr bool PrefixOf(const char* a, const char* b) {
6970 return *a == 0 || (*a == *b && internal::PrefixOf (a + 1 , b + 1 ));
7071}
7172
72- template <int N, int M>
73+ template <size_t N, size_t M>
7374constexpr bool StartsWith (const char (&prefix)[N], const char (&str)[M]) {
7475 return N <= M && internal::PrefixOf (prefix, str);
7576}
7677
77- template <int N, int M>
78+ template <size_t N, size_t M>
7879constexpr bool EndsWith (const char (&suffix)[N], const char (&str)[M]) {
7980 return N <= M && internal::PrefixOf (suffix, str + M - N);
8081}
8182
82- template <int N, int M>
83+ template <size_t N, size_t M>
8384constexpr bool Equals (const char (&a)[N], const char (&b)[M]) {
8485 return N == M && internal::PrefixOf (a, b);
8586}
8687
87- template <int N>
88+ template <size_t N>
8889constexpr bool ValidateSpec (const char (&spec)[N]) {
8990 return internal::Equals (" const" , spec) ||
9091 internal::Equals (" override" , spec) ||
You can’t perform that action at this time.
0 commit comments