Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
6748df1e
Commit
6748df1e
authored
Nov 17, 2019
by
Krystian Kuzniarek
Browse files
remove MSVC workaround: cease const dropping
parent
f9665846
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
googlemock/include/gmock/gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+3
-14
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
6748df1e
...
@@ -4057,11 +4057,8 @@ template <typename Container>
...
@@ -4057,11 +4057,8 @@ template <typename Container>
inline
PolymorphicMatcher
<
internal
::
ContainerEqMatcher
<
inline
PolymorphicMatcher
<
internal
::
ContainerEqMatcher
<
typename
std
::
remove_const
<
Container
>::
type
>>
typename
std
::
remove_const
<
Container
>::
type
>>
ContainerEq
(
const
Container
&
rhs
)
{
ContainerEq
(
const
Container
&
rhs
)
{
// This following line is for working around a bug in MSVC 8.0,
// which causes Container to be a const type sometimes.
typedef
typename
std
::
remove_const
<
Container
>::
type
RawContainer
;
return
MakePolymorphicMatcher
(
return
MakePolymorphicMatcher
(
internal
::
ContainerEqMatcher
<
Raw
Container
>
(
rhs
));
internal
::
ContainerEqMatcher
<
Container
>
(
rhs
));
}
}
// Returns a matcher that matches a container that, when sorted using
// Returns a matcher that matches a container that, when sorted using
...
@@ -4094,11 +4091,7 @@ template <typename TupleMatcher, typename Container>
...
@@ -4094,11 +4091,7 @@ template <typename TupleMatcher, typename Container>
inline
internal
::
PointwiseMatcher
<
TupleMatcher
,
inline
internal
::
PointwiseMatcher
<
TupleMatcher
,
typename
std
::
remove_const
<
Container
>::
type
>
typename
std
::
remove_const
<
Container
>::
type
>
Pointwise
(
const
TupleMatcher
&
tuple_matcher
,
const
Container
&
rhs
)
{
Pointwise
(
const
TupleMatcher
&
tuple_matcher
,
const
Container
&
rhs
)
{
// This following line is for working around a bug in MSVC 8.0,
return
internal
::
PointwiseMatcher
<
TupleMatcher
,
Container
>
(
// which causes Container to be a const type sometimes (e.g. when
// rhs is a const int[])..
typedef
typename
std
::
remove_const
<
Container
>::
type
RawContainer
;
return
internal
::
PointwiseMatcher
<
TupleMatcher
,
RawContainer
>
(
tuple_matcher
,
rhs
);
tuple_matcher
,
rhs
);
}
}
...
@@ -4130,14 +4123,10 @@ inline internal::UnorderedElementsAreArrayMatcher<
...
@@ -4130,14 +4123,10 @@ inline internal::UnorderedElementsAreArrayMatcher<
typename
std
::
remove_const
<
RhsContainer
>::
type
>::
type
::
value_type
>>
typename
std
::
remove_const
<
RhsContainer
>::
type
>::
type
::
value_type
>>
UnorderedPointwise
(
const
Tuple2Matcher
&
tuple2_matcher
,
UnorderedPointwise
(
const
Tuple2Matcher
&
tuple2_matcher
,
const
RhsContainer
&
rhs_container
)
{
const
RhsContainer
&
rhs_container
)
{
// This following line is for working around a bug in MSVC 8.0,
// which causes RhsContainer to be a const type sometimes (e.g. when
// rhs_container is a const int[]).
typedef
typename
std
::
remove_const
<
RhsContainer
>::
type
RawRhsContainer
;
// RhsView allows the same code to handle RhsContainer being a
// RhsView allows the same code to handle RhsContainer being a
// STL-style container and it being a native C-style array.
// STL-style container and it being a native C-style array.
typedef
typename
internal
::
StlContainerView
<
Raw
RhsContainer
>
RhsView
;
typedef
typename
internal
::
StlContainerView
<
RhsContainer
>
RhsView
;
typedef
typename
RhsView
::
type
RhsStlContainer
;
typedef
typename
RhsView
::
type
RhsStlContainer
;
typedef
typename
RhsStlContainer
::
value_type
Second
;
typedef
typename
RhsStlContainer
::
value_type
Second
;
const
RhsStlContainer
&
rhs_stl_container
=
const
RhsStlContainer
&
rhs_stl_container
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment