diff options
author | CJ Johnson <johnsoncj@google.com> | 2021-06-17 16:52:27 (GMT) |
---|---|---|
committer | CJ Johnson <johnsoncj@google.com> | 2021-06-17 16:52:27 (GMT) |
commit | 7153098229e88295f9655ff1d3b0e2fa9eada5f8 (patch) | |
tree | 348f695126fd6db283147f8e35bb1ce9deff26a3 /googlemock/include/gmock | |
parent | 22a2e019c47322e1b43973e77293d7ecbb7f40b7 (diff) | |
parent | 5ef9f63a72bbc4814ad704d22c74b23530793bb2 (diff) | |
download | googletest-7153098229e88295f9655ff1d3b0e2fa9eada5f8.zip googletest-7153098229e88295f9655ff1d3b0e2fa9eada5f8.tar.gz googletest-7153098229e88295f9655ff1d3b0e2fa9eada5f8.tar.bz2 |
Merge pull request #3429 from 1KoT1:master
PiperOrigin-RevId: 379625931
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 86be9c1..be174b7 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 <typename T> -inline internal::ElementsAreArrayMatcher<T> 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 <typename T, size_t N> -inline internal::ElementsAreArrayMatcher<T> ElementsAreArray( - const T (&array)[N]) { +inline auto ElementsAreArray(const T (&array)[N]) + -> decltype(ElementsAreArray(array, N)) { return ElementsAreArray(array, N); } template <typename Container> -inline internal::ElementsAreArrayMatcher<typename Container::value_type> -ElementsAreArray(const Container& container) { +inline auto ElementsAreArray(const Container& container) + -> decltype(ElementsAreArray(container.begin(), container.end())) { return ElementsAreArray(container.begin(), container.end()); } template <typename T> -inline internal::ElementsAreArrayMatcher<T> -ElementsAreArray(::std::initializer_list<T> xs) { +inline auto ElementsAreArray(::std::initializer_list<T> xs) + -> decltype(ElementsAreArray(xs.begin(), xs.end())) { return ElementsAreArray(xs.begin(), xs.end()); } |