remove a custom implementation of std::remove_const

This commit is contained in:
Krystian Kuzniarek
2019-08-13 23:59:59 +02:00
parent 90a443f9c2
commit 364839ab14
4 changed files with 27 additions and 74 deletions

View File

@@ -429,8 +429,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; }
@@ -440,7 +440,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'
@@ -464,8 +464,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;