diff --git a/deps/googletest/include/gtest/gtest-assertion-result.h b/deps/googletest/include/gtest/gtest-assertion-result.h index 52a6d62c77ec2f..7a5e223fa211e0 100644 --- a/deps/googletest/include/gtest/gtest-assertion-result.h +++ b/deps/googletest/include/gtest/gtest-assertion-result.h @@ -161,8 +161,7 @@ class GTEST_API_ [[nodiscard]] AssertionResult { template explicit AssertionResult( const T& success, - typename std::enable_if< - !std::is_convertible::value>::type* + std::enable_if_t>* /*enabler*/ = nullptr) : success_(success) {} diff --git a/deps/googletest/include/gtest/gtest-matchers.h b/deps/googletest/include/gtest/gtest-matchers.h index 6d2ab14d2ad9bd..d7bdd047f1a6f1 100644 --- a/deps/googletest/include/gtest/gtest-matchers.h +++ b/deps/googletest/include/gtest/gtest-matchers.h @@ -277,8 +277,8 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface { Init(impl); } - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> MatcherBase(M&& m) : vtable_(nullptr), buffer_() { // NOLINT Init(std::forward(m)); } @@ -363,11 +363,10 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface { // from the impl, but some users really want to get their impl back when // they call GetDescriber(). // We use std::get on a tuple as a workaround of not having `if constexpr`. - return std::get<( - std::is_convertible::value - ? 1 - : 0)>(std::make_tuple(&m, &P::Get(m))); + return std::get<(std::is_convertible_v + ? 1 + : 0)>(std::make_tuple(&m, &P::Get(m))); } template @@ -396,8 +395,8 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface { template static constexpr bool IsInlined() { return sizeof(M) <= sizeof(Buffer) && alignof(M) <= alignof(Buffer) && - std::is_trivially_copy_constructible::value && - std::is_trivially_destructible::value; + std::is_trivially_copy_constructible_v && + std::is_trivially_destructible_v; } template ()> @@ -444,7 +443,7 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface { template void Init(M&& m) { - using MM = typename std::decay::type; + using MM = std::decay_t; using Policy = ValuePolicy; vtable_ = GetVTable(); Policy::Init(*this, std::forward(m)); @@ -473,14 +472,12 @@ class [[nodiscard]] Matcher : public internal::MatcherBase { : internal::MatcherBase(impl) {} template - explicit Matcher( - const MatcherInterface* impl, - typename std::enable_if::value>::type* = - nullptr) + explicit Matcher(const MatcherInterface* impl, + std::enable_if_t>* = nullptr) : internal::MatcherBase(impl) {} - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> Matcher(M&& m) : internal::MatcherBase(std::forward(m)) {} // NOLINT // Implicit constructor here allows people to write @@ -509,8 +506,8 @@ Matcher : public internal::MatcherBase { explicit Matcher(const MatcherInterface* impl) : internal::MatcherBase(impl) {} - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase(std::forward(m)) {} @@ -533,8 +530,8 @@ Matcher : public internal::MatcherBase { explicit Matcher(const MatcherInterface* impl) : internal::MatcherBase(impl) {} - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase(std::forward(m)) {} @@ -559,8 +556,8 @@ class GTEST_API_ [[nodiscard]] Matcher explicit Matcher(const MatcherInterface* impl) : internal::MatcherBase(impl) {} - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase(std::forward(m)) { } @@ -587,8 +584,8 @@ class GTEST_API_ [[nodiscard]] Matcher explicit Matcher(const MatcherInterface* impl) : internal::MatcherBase(impl) {} - template ::type::is_gtest_matcher> + template ::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase(std::forward(m)) {} @@ -815,8 +812,8 @@ class [[nodiscard]] ImplicitCastEqMatcher { StoredRhs stored_rhs_; }; -template ::value>::type> +template >> using StringLike = T; // Implements polymorphic matchers MatchesRegex(regex) and diff --git a/deps/googletest/include/gtest/gtest-printers.h b/deps/googletest/include/gtest/gtest-printers.h index d1704bb7580a96..a13815733effde 100644 --- a/deps/googletest/include/gtest/gtest-printers.h +++ b/deps/googletest/include/gtest/gtest-printers.h @@ -863,8 +863,8 @@ void PrintTupleTo(const T& t, std::integral_constant, GTEST_INTENTIONAL_CONST_COND_POP_() *os << ", "; } - UniversalPrinter::type>::Print( - std::get(t), os); + UniversalPrinter>::Print(std::get(t), + os); } template @@ -1218,7 +1218,7 @@ template Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { Strings result; TersePrintPrefixToStrings( - value, std::integral_constant::value>(), + value, std::integral_constant>(), &result); return result; } diff --git a/deps/googletest/include/gtest/gtest.h b/deps/googletest/include/gtest/gtest.h index f4a91ee44d0aeb..a7193379b9ffaa 100644 --- a/deps/googletest/include/gtest/gtest.h +++ b/deps/googletest/include/gtest/gtest.h @@ -2164,7 +2164,7 @@ class GTEST_API_ [[nodiscard]] ScopedTrace { // to cause a compiler error. template constexpr bool StaticAssertTypeEq() noexcept { - static_assert(std::is_same::value, "T1 and T2 are not the same type"); + static_assert(std::is_same_v, "T1 and T2 are not the same type"); return true; } @@ -2310,7 +2310,7 @@ template TestInfo* RegisterTest(const char* test_suite_name, const char* test_name, const char* type_param, const char* value_param, const char* file, int line, Factory factory) { - using TestT = typename std::remove_pointer::type; + using TestT = std::remove_pointer_t; class FactoryImpl : public internal::TestFactoryBase { public: