diff options
| author | Martin Hořeňovský | 2020-05-09 21:07:42 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-09 21:07:55 +0200 |
| commit | b93cf932fb4657ae650f38b5427e01553c7de2e6 (patch) | |
| tree | 18e121243e32fd4fa7910a0db0458d8d0bc99a2e /src | |
| parent | eef6c9b79b43a4f5a902813093266f5a8633eb60 (diff) | |
| download | catch3-b93cf932fb4657ae650f38b5427e01553c7de2e6.tar.gz | |
Use UDLs to construct StringRefs for decomposed operators directly
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/internal/catch_decomposer.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/catch2/internal/catch_decomposer.hpp b/src/catch2/internal/catch_decomposer.hpp index 260a3f78..6ed828b9 100644 --- a/src/catch2/internal/catch_decomposer.hpp +++ b/src/catch2/internal/catch_decomposer.hpp @@ -178,47 +178,47 @@ namespace Catch { template<typename RhsT> auto operator == ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { compareEqual( m_lhs, rhs ), m_lhs, "==", rhs }; + return { compareEqual( m_lhs, rhs ), m_lhs, "=="_sr, rhs }; } auto operator == ( bool rhs ) -> BinaryExpr<LhsT, bool> const { - return { m_lhs == rhs, m_lhs, "==", rhs }; + return { m_lhs == rhs, m_lhs, "=="_sr, rhs }; } template<typename RhsT> auto operator != ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { compareNotEqual( m_lhs, rhs ), m_lhs, "!=", rhs }; + return { compareNotEqual( m_lhs, rhs ), m_lhs, "!="_sr, rhs }; } auto operator != ( bool rhs ) -> BinaryExpr<LhsT, bool> const { - return { m_lhs != rhs, m_lhs, "!=", rhs }; + return { m_lhs != rhs, m_lhs, "!="_sr, rhs }; } template<typename RhsT> auto operator > ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs > rhs), m_lhs, ">", rhs }; + return { static_cast<bool>(m_lhs > rhs), m_lhs, ">"_sr, rhs }; } template<typename RhsT> auto operator < ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs < rhs), m_lhs, "<", rhs }; + return { static_cast<bool>(m_lhs < rhs), m_lhs, "<"_sr, rhs }; } template<typename RhsT> auto operator >= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs >= rhs), m_lhs, ">=", rhs }; + return { static_cast<bool>(m_lhs >= rhs), m_lhs, ">="_sr, rhs }; } template<typename RhsT> auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs }; + return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<="_sr, rhs }; } template <typename RhsT> auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs }; + return { static_cast<bool>(m_lhs | rhs), m_lhs, "|"_sr, rhs }; } template <typename RhsT> auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs }; + return { static_cast<bool>(m_lhs & rhs), m_lhs, "&"_sr, rhs }; } template <typename RhsT> auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const { - return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs }; + return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^"_sr, rhs }; } template<typename RhsT> |