Skip to content

Commit 7153098

Browse files
committed
Merge pull request #3429 from 1KoT1:master
PiperOrigin-RevId: 379625931
2 parents 22a2e01 + 5ef9f63 commit 7153098

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

googlemock/include/gmock/gmock-matchers.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -3981,26 +3981,26 @@ ElementsAreArray(Iter first, Iter last) {
39813981
}
39823982

39833983
template <typename T>
3984-
inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
3985-
const T* pointer, size_t count) {
3984+
inline auto ElementsAreArray(const T* pointer, size_t count)
3985+
-> decltype(ElementsAreArray(pointer, pointer + count)) {
39863986
return ElementsAreArray(pointer, pointer + count);
39873987
}
39883988

39893989
template <typename T, size_t N>
3990-
inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
3991-
const T (&array)[N]) {
3990+
inline auto ElementsAreArray(const T (&array)[N])
3991+
-> decltype(ElementsAreArray(array, N)) {
39923992
return ElementsAreArray(array, N);
39933993
}
39943994

39953995
template <typename Container>
3996-
inline internal::ElementsAreArrayMatcher<typename Container::value_type>
3997-
ElementsAreArray(const Container& container) {
3996+
inline auto ElementsAreArray(const Container& container)
3997+
-> decltype(ElementsAreArray(container.begin(), container.end())) {
39983998
return ElementsAreArray(container.begin(), container.end());
39993999
}
40004000

40014001
template <typename T>
4002-
inline internal::ElementsAreArrayMatcher<T>
4003-
ElementsAreArray(::std::initializer_list<T> xs) {
4002+
inline auto ElementsAreArray(::std::initializer_list<T> xs)
4003+
-> decltype(ElementsAreArray(xs.begin(), xs.end())) {
40044004
return ElementsAreArray(xs.begin(), xs.end());
40054005
}
40064006

0 commit comments

Comments
 (0)