diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 86be9c17..be174b7a 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -3981,26 +3981,26 @@ ElementsAreArray(Iter first, Iter last) { } template -inline internal::ElementsAreArrayMatcher ElementsAreArray( - const T* pointer, size_t count) { +inline auto ElementsAreArray(const T* pointer, size_t count) + -> decltype(ElementsAreArray(pointer, pointer + count)) { return ElementsAreArray(pointer, pointer + count); } template -inline internal::ElementsAreArrayMatcher ElementsAreArray( - const T (&array)[N]) { +inline auto ElementsAreArray(const T (&array)[N]) + -> decltype(ElementsAreArray(array, N)) { return ElementsAreArray(array, N); } template -inline internal::ElementsAreArrayMatcher -ElementsAreArray(const Container& container) { +inline auto ElementsAreArray(const Container& container) + -> decltype(ElementsAreArray(container.begin(), container.end())) { return ElementsAreArray(container.begin(), container.end()); } template -inline internal::ElementsAreArrayMatcher -ElementsAreArray(::std::initializer_list xs) { +inline auto ElementsAreArray(::std::initializer_list xs) + -> decltype(ElementsAreArray(xs.begin(), xs.end())) { return ElementsAreArray(xs.begin(), xs.end()); }