aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-actions.h
diff options
context:
space:
mode:
authorHosein Ghahremanzadeh <hgsilverman@gmail.com>2019-09-12 10:36:44 -0400
committerShaindel Schwartz <shaindel@google.com>2019-09-12 12:10:41 -0400
commitac24edd6e06114818b1a29c99bb81153514f7fb2 (patch)
treee2340b84ae36b4d498eeba21e3591fdadb494569 /googlemock/include/gmock/gmock-actions.h
parent274afe50cf57630ef9d34e702cf77f1854358581 (diff)
downloadgoogletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.gz
googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.bz2
googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.zip
Googletest export
Merge 4c9ef099b29d2c840c04643cd9662fd7be712f7b into 565f1b848215b77c3732bca345fe76a0431d8b34 Closes #2403 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2403 from IYP-Programer-Yeah:remove-compile-assert-type-equal 4c9ef099b29d2c840c04643cd9662fd7be712f7b PiperOrigin-RevId: 268681883
Diffstat (limited to 'googlemock/include/gmock/gmock-actions.h')
-rw-r--r--googlemock/include/gmock/gmock-actions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h
index 9605c43a..9842f320 100644
--- a/googlemock/include/gmock/gmock-actions.h
+++ b/googlemock/include/gmock/gmock-actions.h
@@ -619,7 +619,7 @@ class ReturnVoidAction {
// Allows Return() to be used in any void-returning function.
template <typename Result, typename ArgumentTuple>
static void Perform(const ArgumentTuple&) {
- CompileAssertTypesEqual<void, Result>();
+ static_assert(std::is_void<Result>::value, "Result should be void.");
}
};
@@ -842,7 +842,7 @@ class IgnoreResultAction {
typedef typename internal::Function<F>::Result Result;
// Asserts at compile time that F returns void.
- CompileAssertTypesEqual<void, Result>();
+ static_assert(std::is_void<Result>::value, "Result type should be void.");
return Action<F>(new Impl<F>(action_));
}