Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.h

    rf229fc2 r4a161be  
    2424class Expression;
    2525
    26 class GC;
    27 
    2826namespace ResolvExpr {
    2927        struct Alternative {
     
    3129                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost );
    3230                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost );
    33                 Alternative( const Alternative &other ) = default;
    34                 Alternative &operator=( const Alternative &other ) = default;
     31                Alternative( const Alternative &other );
     32                Alternative &operator=( const Alternative &other );
     33                Alternative( Alternative && other );
     34                Alternative &operator=( Alternative && other );
     35                ~Alternative();
    3536
    3637                void print( std::ostream &os, Indenter indent = {} ) const;
    3738
     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
    3846                Cost cost;
    3947                Cost cvtCost;
    40                 Expression * expr;
     48                Expression *expr;
    4149                TypeEnvironment env;
    4250        };
     
    5462                return os;
    5563        }
    56 
    57         const GC& operator<< ( const GC&, const Alternative& );
    5864} // namespace ResolvExpr
    5965
Note: See TracChangeset for help on using the changeset viewer.