summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest.h
diff options
context:
space:
mode:
authorkuzkry <krystian.kuzniarek@gmail.com>2019-09-16 05:46:55 (GMT)
committerShaindel Schwartz <shaindel@google.com>2019-09-16 15:47:35 (GMT)
commitf2fb48c3b3d79a75a88a99fba6576b25d42ec528 (patch)
treee0e97e09100ca73573c192952ac5fb2a9194727c /googletest/include/gtest/gtest.h
parentcad3bc46c2ba8ec0bd7bb252d7279fe791140fbf (diff)
downloadgoogletest-f2fb48c3b3d79a75a88a99fba6576b25d42ec528.zip
googletest-f2fb48c3b3d79a75a88a99fba6576b25d42ec528.tar.gz
googletest-f2fb48c3b3d79a75a88a99fba6576b25d42ec528.tar.bz2
Googletest export
Merge 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd into fb49e6c164490a227bbb7cf5223b846c836a0305 Closes #2407 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2407 from kuzkry:StaticAssertTypeEq 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd PiperOrigin-RevId: 269255328
Diffstat (limited to 'googletest/include/gtest/gtest.h')
-rw-r--r--googletest/include/gtest/gtest.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 8e125a4..dbe5b1c 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -2297,8 +2297,9 @@ class GTEST_API_ ScopedTrace {
//
// to cause a compiler error.
template <typename T1, typename T2>
-bool StaticAssertTypeEq() {
- (void)internal::StaticAssertTypeEqHelper<T1, T2>();
+constexpr bool StaticAssertTypeEq() noexcept {
+ static_assert(std::is_same<T1, T2>::value,
+ "type1 and type2 are not the same type");
return true;
}