diff options
author | Hosein Ghahremanzadeh <hgsilverman@gmail.com> | 2019-09-12 14:36:44 (GMT) |
---|---|---|
committer | Shaindel Schwartz <shaindel@google.com> | 2019-09-12 16:10:41 (GMT) |
commit | ac24edd6e06114818b1a29c99bb81153514f7fb2 (patch) | |
tree | e2340b84ae36b4d498eeba21e3591fdadb494569 /googlemock/include/gmock | |
parent | 274afe50cf57630ef9d34e702cf77f1854358581 (diff) | |
download | googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.zip googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.gz googletest-ac24edd6e06114818b1a29c99bb81153514f7fb2.tar.bz2 |
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')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 9605c43..9842f32 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_)); } |