diff options
Diffstat (limited to 'googlemock/include/gmock/internal')
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index afbdce03..ead6d7c8 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -224,7 +224,7 @@ class FailureReporterInterface { // The type of a failure (either non-fatal or fatal). enum FailureType { kNonfatal, kFatal }; - virtual ~FailureReporterInterface() {} + virtual ~FailureReporterInterface() = default; // Reports a failure that occurred at the given source file location. virtual void ReportFailure(FailureType type, const char* file, int line, @@ -311,7 +311,8 @@ GTEST_API_ WithoutMatchers GetWithoutMatchers(); // crashes). template <typename T> inline T Invalid() { - Assert(false, "", -1, "Internal error: attempt to return invalid value"); + Assert(/*condition=*/false, /*file=*/"", /*line=*/-1, + "Internal error: attempt to return invalid value"); #if defined(__GNUC__) || defined(__clang__) __builtin_unreachable(); #elif defined(_MSC_VER) @@ -464,8 +465,10 @@ struct Function<R(Args...)> { using MakeResultIgnoredValue = IgnoredValue(Args...); }; +#ifdef GTEST_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL template <typename R, typename... Args> constexpr size_t Function<R(Args...)>::ArgumentCount; +#endif // Workaround for MSVC error C2039: 'type': is not a member of 'std' // when std::tuple_element is used. |