MCPcopy Create free account
hub / github.com/Profactor/cv-plot / BinaryExpr

Class BinaryExpr

CvPlot/ext/catch2/inc/catch.hpp:2194–2267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2192
2193 template<typename LhsT, typename RhsT>
2194 class BinaryExpr : public ITransientExpression {
2195 LhsT m_lhs;
2196 StringRef m_op;
2197 RhsT m_rhs;
2198
2199 void streamReconstructedExpression( std::ostream &os ) const override {
2200 formatReconstructedExpression
2201 ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );
2202 }
2203
2204 public:
2205 BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs )
2206 : ITransientExpression{ true, comparisonResult },
2207 m_lhs( lhs ),
2208 m_op( op ),
2209 m_rhs( rhs )
2210 {}
2211
2212 template<typename T>
2213 auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2214 static_assert(always_false<T>::value,
2215 "chained comparisons are not supported inside assertions, "
2216 "wrap the expression inside parentheses, or decompose it");
2217 }
2218
2219 template<typename T>
2220 auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2221 static_assert(always_false<T>::value,
2222 "chained comparisons are not supported inside assertions, "
2223 "wrap the expression inside parentheses, or decompose it");
2224 }
2225
2226 template<typename T>
2227 auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2228 static_assert(always_false<T>::value,
2229 "chained comparisons are not supported inside assertions, "
2230 "wrap the expression inside parentheses, or decompose it");
2231 }
2232
2233 template<typename T>
2234 auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2235 static_assert(always_false<T>::value,
2236 "chained comparisons are not supported inside assertions, "
2237 "wrap the expression inside parentheses, or decompose it");
2238 }
2239
2240 template<typename T>
2241 auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2242 static_assert(always_false<T>::value,
2243 "chained comparisons are not supported inside assertions, "
2244 "wrap the expression inside parentheses, or decompose it");
2245 }
2246
2247 template<typename T>
2248 auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
2249 static_assert(always_false<T>::value,
2250 "chained comparisons are not supported inside assertions, "
2251 "wrap the expression inside parentheses, or decompose it");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected