summaryrefslogtreecommitdiff
path: root/googlemock/include/gmock/internal/gmock-internal-utils.h
diff options
context:
space:
mode:
authorAndy Soffer <804265+asoffer@users.noreply.github.com>2023-05-01 14:27:38 -0400
committerGitHub <noreply@github.com>2023-05-01 14:27:38 -0400
commit76bce79a3493aa157b3baca833fec1e3934d3512 (patch)
tree535cdfa334eb203cfd03505c82904e314ba7b153 /googlemock/include/gmock/internal/gmock-internal-utils.h
parent6f1c4b3d7b139c7217698bf4115be9f40785f661 (diff)
parentf345b2ca6adb1b505049190867eedf24d3b5eaa3 (diff)
downloadgoogletest-git-76bce79a3493aa157b3baca833fec1e3934d3512.tar.gz
Merge branch 'main' into fixes_std_pair_diff
Diffstat (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h')
-rw-r--r--googlemock/include/gmock/internal/gmock-internal-utils.h7
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.