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
0a80845e
Commit
0a80845e
authored
Jul 07, 2020
by
Vladimir Goncharov
Browse files
Fix build under msvc
parent
92d0a6f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
googlemock/include/gmock/gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+15
-1
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
0a80845e
...
@@ -4734,6 +4734,13 @@ namespace internal {
...
@@ -4734,6 +4734,13 @@ namespace internal {
template
<
typename
Err
>
template
<
typename
Err
>
class
ExceptionMatcherImpl
{
class
ExceptionMatcherImpl
{
class
NeverThrown
{
public:
const
char
*
what
()
const
noexcept
{
return
"this exception should never be thrown"
;
}
};
public:
public:
ExceptionMatcherImpl
(
Matcher
<
const
Err
&>
matcher
)
ExceptionMatcherImpl
(
Matcher
<
const
Err
&>
matcher
)
:
matcher_
(
std
::
move
(
matcher
))
{}
:
matcher_
(
std
::
move
(
matcher
))
{}
...
@@ -4764,7 +4771,14 @@ class ExceptionMatcherImpl {
...
@@ -4764,7 +4771,14 @@ class ExceptionMatcherImpl {
}
else
{
}
else
{
return
true
;
return
true
;
}
}
}
catch
(
const
std
::
exception
&
err
)
{
}
catch
(
typename
std
::
conditional
<
std
::
is_same
<
typename
std
::
remove_cv
<
typename
std
::
remove_reference
<
Err
>::
type
>::
type
,
std
::
exception
>::
value
,
const
NeverThrown
&
,
const
std
::
exception
&>::
type
const
&
err
)
{
#if GTEST_HAS_RTTI
#if GTEST_HAS_RTTI
*
listener
<<
"throws an exception of type "
*
listener
<<
"throws an exception of type "
<<
GetTypeName
(
typeid
(
err
))
<<
" "
;
<<
GetTypeName
(
typeid
(
err
))
<<
" "
;
...
...
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