From ac24edd6e06114818b1a29c99bb81153514f7fb2 Mon Sep 17 00:00:00 2001 From: Hosein Ghahremanzadeh Date: Thu, 12 Sep 2019 10:36:44 -0400 Subject: 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 --- googlemock/include/gmock/gmock-actions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'googlemock/include/gmock/gmock-actions.h') 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 static void Perform(const ArgumentTuple&) { - CompileAssertTypesEqual(); + static_assert(std::is_void::value, "Result should be void."); } }; @@ -842,7 +842,7 @@ class IgnoreResultAction { typedef typename internal::Function::Result Result; // Asserts at compile time that F returns void. - CompileAssertTypesEqual(); + static_assert(std::is_void::value, "Result type should be void."); return Action(new Impl(action_)); } -- cgit v1.2.3