@@ -277,8 +277,8 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface {
277277 Init (impl);
278278 }
279279
280- template <typename M, typename = typename std::remove_reference<
281- M>::type ::is_gtest_matcher>
280+ template <typename M,
281+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
282282 MatcherBase (M&& m) : vtable_ (nullptr ), buffer_ () { // NOLINT
283283 Init (std::forward<M>(m));
284284 }
@@ -363,11 +363,10 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface {
363363 // from the impl, but some users really want to get their impl back when
364364 // they call GetDescriber().
365365 // We use std::get on a tuple as a workaround of not having `if constexpr`.
366- return std::get<(
367- std::is_convertible<decltype (&P::Get (m)),
368- const MatcherDescriberInterface*>::value
369- ? 1
370- : 0 )>(std::make_tuple (&m, &P::Get (m)));
366+ return std::get<(std::is_convertible_v<decltype (&P::Get (m)),
367+ const MatcherDescriberInterface*>
368+ ? 1
369+ : 0 )>(std::make_tuple (&m, &P::Get (m)));
371370 }
372371
373372 template <typename P>
@@ -396,8 +395,8 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface {
396395 template <typename M>
397396 static constexpr bool IsInlined () {
398397 return sizeof (M) <= sizeof (Buffer) && alignof (M) <= alignof (Buffer) &&
399- std::is_trivially_copy_constructible <M>::value &&
400- std::is_trivially_destructible <M>::value ;
398+ std::is_trivially_copy_constructible_v <M> &&
399+ std::is_trivially_destructible_v <M>;
401400 }
402401
403402 template <typename M, bool = MatcherBase::IsInlined<M>()>
@@ -444,7 +443,7 @@ class [[nodiscard]] MatcherBase : private MatcherDescriberInterface {
444443
445444 template <typename M>
446445 void Init (M&& m) {
447- using MM = typename std::decay <M>::type ;
446+ using MM = std::decay_t <M>;
448447 using Policy = ValuePolicy<MM >;
449448 vtable_ = GetVTable<Policy>();
450449 Policy::Init (*this , std::forward<M>(m));
@@ -473,14 +472,12 @@ class [[nodiscard]] Matcher : public internal::MatcherBase<T> {
473472 : internal::MatcherBase<T>(impl) {}
474473
475474 template <typename U>
476- explicit Matcher (
477- const MatcherInterface<U>* impl,
478- typename std::enable_if<!std::is_same<U, const U&>::value>::type* =
479- nullptr )
475+ explicit Matcher (const MatcherInterface<U>* impl,
476+ std::enable_if_t <!std::is_same_v<U, const U&>>* = nullptr )
480477 : internal::MatcherBase<T>(impl) {}
481478
482- template <typename M, typename = typename std::remove_reference<
483- M>::type ::is_gtest_matcher>
479+ template <typename M,
480+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
484481 Matcher (M&& m) : internal::MatcherBase<T>(std::forward<M>(m)) {} // NOLINT
485482
486483 // Implicit constructor here allows people to write
@@ -509,8 +506,8 @@ Matcher<const std::string&> : public internal::MatcherBase<const std::string&> {
509506 explicit Matcher (const MatcherInterface<const std::string&>* impl)
510507 : internal::MatcherBase<const std::string&>(impl) {}
511508
512- template <typename M, typename = typename std::remove_reference<
513- M>::type ::is_gtest_matcher>
509+ template <typename M,
510+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
514511 Matcher (M&& m) // NOLINT
515512 : internal::MatcherBase<const std::string&>(std::forward<M>(m)) {}
516513
@@ -533,8 +530,8 @@ Matcher<std::string> : public internal::MatcherBase<std::string> {
533530 explicit Matcher (const MatcherInterface<std::string>* impl)
534531 : internal::MatcherBase<std::string>(impl) {}
535532
536- template <typename M, typename = typename std::remove_reference<
537- M>::type ::is_gtest_matcher>
533+ template <typename M,
534+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
538535 Matcher (M&& m) // NOLINT
539536 : internal::MatcherBase<std::string>(std::forward<M>(m)) {}
540537
@@ -559,8 +556,8 @@ class GTEST_API_ [[nodiscard]] Matcher<const internal::StringView&>
559556 explicit Matcher (const MatcherInterface<const internal::StringView&>* impl)
560557 : internal::MatcherBase<const internal::StringView&>(impl) {}
561558
562- template <typename M, typename = typename std::remove_reference<
563- M>::type ::is_gtest_matcher>
559+ template <typename M,
560+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
564561 Matcher (M&& m) // NOLINT
565562 : internal::MatcherBase<const internal::StringView&>(std::forward<M>(m)) {
566563 }
@@ -587,8 +584,8 @@ class GTEST_API_ [[nodiscard]] Matcher<internal::StringView>
587584 explicit Matcher (const MatcherInterface<internal::StringView>* impl)
588585 : internal::MatcherBase<internal::StringView>(impl) {}
589586
590- template <typename M, typename = typename std::remove_reference<
591- M>::type ::is_gtest_matcher>
587+ template <typename M,
588+ typename = typename std:: remove_reference_t <M> ::is_gtest_matcher>
592589 Matcher (M&& m) // NOLINT
593590 : internal::MatcherBase<internal::StringView>(std::forward<M>(m)) {}
594591
@@ -815,8 +812,8 @@ class [[nodiscard]] ImplicitCastEqMatcher {
815812 StoredRhs stored_rhs_;
816813};
817814
818- template <typename T, typename = typename std::enable_if<
819- std::is_constructible <std::string, T>::value>::type >
815+ template <typename T,
816+ typename = std::enable_if_t <std::is_constructible_v<std:: string, T>> >
820817using StringLike = T;
821818
822819// Implements polymorphic matchers MatchesRegex(regex) and
0 commit comments