diff options
author | Xiaoyi Zhang <zhangxy@google.com> | 2019-08-21 21:13:34 (GMT) |
---|---|---|
committer | Xiaoyi Zhang <zhangxy@google.com> | 2019-08-21 21:13:34 (GMT) |
commit | fb49e6c164490a227bbb7cf5223b846c836a0305 (patch) | |
tree | 514f003ed3a2e3db3c5e4339115a3924aba47687 /googlemock/include/gmock/internal/gmock-internal-utils.h | |
parent | d1ad644db4b9f5c89a12be6265282cd622c23b5a (diff) | |
parent | 364839ab142e5d6e4efc89953e0911267d7c5502 (diff) | |
download | googletest-fb49e6c164490a227bbb7cf5223b846c836a0305.zip googletest-fb49e6c164490a227bbb7cf5223b846c836a0305.tar.gz googletest-fb49e6c164490a227bbb7cf5223b846c836a0305.tar.bz2 |
Merge pull request #2393 from kuzkry:custom-type-traits-remove_const
PiperOrigin-RevId: 264652890
Diffstat (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h')
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 05d37d5..c49e28e 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -402,8 +402,8 @@ class StlContainerView { static const_reference ConstReference(const RawContainer& container) { // Ensures that RawContainer is not a const type. - testing::StaticAssertTypeEq<RawContainer, - GTEST_REMOVE_CONST_(RawContainer)>(); + testing::StaticAssertTypeEq< + RawContainer, typename std::remove_const<RawContainer>::type>(); return container; } static type Copy(const RawContainer& container) { return container; } @@ -413,7 +413,7 @@ class StlContainerView { template <typename Element, size_t N> class StlContainerView<Element[N]> { public: - typedef GTEST_REMOVE_CONST_(Element) RawElement; + typedef typename std::remove_const<Element>::type RawElement; typedef internal::NativeArray<RawElement> type; // NativeArray<T> can represent a native array either by value or by // reference (selected by a constructor argument), so 'const type' @@ -437,8 +437,8 @@ class StlContainerView<Element[N]> { template <typename ElementPointer, typename Size> class StlContainerView< ::std::tuple<ElementPointer, Size> > { public: - typedef GTEST_REMOVE_CONST_( - typename internal::PointeeOf<ElementPointer>::type) RawElement; + typedef typename std::remove_const< + typename internal::PointeeOf<ElementPointer>::type>::type RawElement; typedef internal::NativeArray<RawElement> type; typedef const type const_reference; |