- basic * duplicate() const;
- void print(ostream & os, unsigned upper_precedence=0) const;
- void printraw(ostream & os) const;
- void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
- bool info(unsigned inf) const;
- unsigned nops() const;
- ex & let_op(int const i);
- ex eval(int level=0) const;
- ex evalf(int level=0) const;
- ex simplify_ncmul(exvector const & v) const;
-protected:
- int compare_same_type(basic const & other) const;
- unsigned return_type(void) const;
- unsigned return_type_tinfo(void) const;
+ virtual ex lhs(void) const;
+ virtual ex rhs(void) const;
+
+ // non-virtual functions in this class
+private:
+ // For conversions to boolean, as would be used in an if conditional,
+ // implicit conversions from bool to int have a large number of
+ // undesirable side effects. The following safe_bool type enables
+ // use of relational objects in conditionals without those side effects
+ struct safe_bool_helper {
+ void nonnull() {};
+ };