MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / BinaryExpr

Class BinaryExpr

tests/catch.hpp:1858–1931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1856
1857 template<typename LhsT, typename RhsT>
1858 class BinaryExpr : public ITransientExpression {
1859 LhsT m_lhs;
1860 StringRef m_op;
1861 RhsT m_rhs;
1862
1863 void streamReconstructedExpression( std::ostream &os ) const override {
1864 formatReconstructedExpression
1865 ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) );
1866 }
1867
1868 public:
1869 BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs )
1870 : ITransientExpression{ true, comparisonResult },
1871 m_lhs( lhs ),
1872 m_op( op ),
1873 m_rhs( rhs )
1874 {}
1875
1876 template<typename T>
1877 auto operator && ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1878 static_assert(always_false<T>::value,
1879 "chained comparisons are not supported inside assertions, "
1880 "wrap the expression inside parentheses, or decompose it");
1881 }
1882
1883 template<typename T>
1884 auto operator || ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1885 static_assert(always_false<T>::value,
1886 "chained comparisons are not supported inside assertions, "
1887 "wrap the expression inside parentheses, or decompose it");
1888 }
1889
1890 template<typename T>
1891 auto operator == ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1892 static_assert(always_false<T>::value,
1893 "chained comparisons are not supported inside assertions, "
1894 "wrap the expression inside parentheses, or decompose it");
1895 }
1896
1897 template<typename T>
1898 auto operator != ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1899 static_assert(always_false<T>::value,
1900 "chained comparisons are not supported inside assertions, "
1901 "wrap the expression inside parentheses, or decompose it");
1902 }
1903
1904 template<typename T>
1905 auto operator > ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1906 static_assert(always_false<T>::value,
1907 "chained comparisons are not supported inside assertions, "
1908 "wrap the expression inside parentheses, or decompose it");
1909 }
1910
1911 template<typename T>
1912 auto operator < ( T ) const -> BinaryExpr<LhsT, RhsT const&> const {
1913 static_assert(always_false<T>::value,
1914 "chained comparisons are not supported inside assertions, "
1915 "wrap the expression inside parentheses, or decompose it");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected