Changes in src/ResolvExpr/Alternative.h [f6f0cca3:4a161be]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Alternative.h
rf6f0cca3 r4a161be 24 24 class Expression; 25 25 26 class GC;27 28 26 namespace ResolvExpr { 29 27 struct Alternative { … … 32 30 Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost ); 33 31 Alternative( const Alternative &other ); 34 Alternative & operator= ( const Alternative &other ); 35 Alternative( Alternative&& other ) = default; 36 Alternative & operator= ( Alternative&& other ) = default; 32 Alternative &operator=( const Alternative &other ); 33 Alternative( Alternative && other ); 34 Alternative &operator=( Alternative && other ); 35 ~Alternative(); 37 36 38 37 void print( std::ostream &os, Indenter indent = {} ) const; 39 38 39 /// Returns the stored expression, but released from management of this Alternative 40 Expression* release_expr() { 41 Expression* tmp = expr; 42 expr = nullptr; 43 return tmp; 44 } 45 40 46 Cost cost; 41 47 Cost cvtCost; 42 Expression * 48 Expression *expr; 43 49 TypeEnvironment env; 44 50 }; … … 56 62 return os; 57 63 } 58 59 const GC& operator<< ( const GC&, const Alternative& );60 64 } // namespace ResolvExpr 61 65
Note: See TracChangeset
for help on using the changeset viewer.