diff --git a/src/catch2/catch_matchers_templates.hpp b/src/catch2/catch_matchers_templates.hpp index 1a8bedbd..17ae0d62 100644 --- a/src/catch2/catch_matchers_templates.hpp +++ b/src/catch2/catch_matchers_templates.hpp @@ -180,24 +180,22 @@ namespace Matchers { } // namespace Detail - // FIXME: enable_if_t - // compose only generic matchers template - typename std::enable_if::value, Detail::MatchAllOfGeneric>::type + std::enable_if_t::value, Detail::MatchAllOfGeneric> operator && (MatcherLHS const& lhs, MatcherRHS const& rhs) { return { lhs, rhs }; } template - typename std::enable_if::value, Detail::MatchAnyOfGeneric>::type + std::enable_if_t::value, Detail::MatchAnyOfGeneric> operator || (MatcherLHS const& lhs, MatcherRHS const& rhs) { return { lhs, rhs }; } //! Wrap provided generic matcher in generic negator template - typename std::enable_if::value, Detail::MatchNotOfGeneric>::type + std::enable_if_t::value, Detail::MatchNotOfGeneric> operator ! (MatcherT const& matcher) { return Detail::MatchNotOfGeneric{matcher}; } @@ -205,25 +203,25 @@ namespace Matchers { // compose mixed generic and non-generic matchers template - typename std::enable_if::value, Detail::MatchAllOfGeneric>>::type + std::enable_if_t::value, Detail::MatchAllOfGeneric>> operator && (MatcherLHS const& lhs, MatcherBase const& rhs) { return { lhs, rhs }; } template - typename std::enable_if::value, Detail::MatchAllOfGeneric, MatcherRHS>>::type + std::enable_if_t::value, Detail::MatchAllOfGeneric, MatcherRHS>> operator && (MatcherBase const& lhs, MatcherRHS const& rhs) { return { lhs, rhs }; } template - typename std::enable_if::value, Detail::MatchAnyOfGeneric>>::type + std::enable_if_t::value, Detail::MatchAnyOfGeneric>> operator || (MatcherLHS const& lhs, MatcherBase const& rhs) { return { lhs, rhs }; } template - typename std::enable_if::value, Detail::MatchAnyOfGeneric, MatcherRHS>>::type + std::enable_if_t::value, Detail::MatchAnyOfGeneric, MatcherRHS>> operator || (MatcherBase const& lhs, MatcherRHS const& rhs) { return { lhs, rhs }; } @@ -237,13 +235,13 @@ namespace Matchers { } template - typename std::enable_if::value, Detail::MatchAllOfGeneric>::type + std::enable_if_t::value, Detail::MatchAllOfGeneric> operator && (Detail::MatchAllOfGeneric&& lhs, MatcherRHS const& rhs) { return Detail::MatchAllOfGeneric{Detail::array_cat(std::move(lhs.m_matchers), static_cast(&rhs))}; } template - typename std::enable_if::value, Detail::MatchAllOfGeneric>::type + std::enable_if_t::value, Detail::MatchAllOfGeneric> operator && (MatcherLHS const& lhs, Detail::MatchAllOfGeneric&& rhs) { return Detail::MatchAllOfGeneric{Detail::array_cat(static_cast(std::addressof(lhs)), std::move(rhs.m_matchers))}; } @@ -255,13 +253,13 @@ namespace Matchers { } template - typename std::enable_if::value, Detail::MatchAnyOfGeneric>::type + std::enable_if_t::value, Detail::MatchAnyOfGeneric> operator || (Detail::MatchAnyOfGeneric&& lhs, MatcherRHS const& rhs) { return Detail::MatchAnyOfGeneric{Detail::array_cat(std::move(lhs.m_matchers), static_cast(std::addressof(rhs)))}; } template - typename std::enable_if::value, Detail::MatchAnyOfGeneric>::type + std::enable_if_t::value, Detail::MatchAnyOfGeneric> operator || (MatcherLHS const& lhs, Detail::MatchAnyOfGeneric&& rhs) { return Detail::MatchAnyOfGeneric{Detail::array_cat(static_cast(std::addressof(lhs)), std::move(rhs.m_matchers))}; }