Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Alternative.h

    r4a161be rf6f0cca3  
    2424class Expression;
    2525
     26class GC;
     27
    2628namespace ResolvExpr {
    2729        struct Alternative {
     
    3032                Alternative( Expression *expr, const TypeEnvironment &env, const Cost &cost, const Cost &cvtCost );
    3133                Alternative( const Alternative &other );
    32                 Alternative &operator=( const Alternative &other );
    33                 Alternative( Alternative && other );
    34                 Alternative &operator=( Alternative && other );
    35                 ~Alternative();
     34                Alternative & operator= ( const Alternative &other );
     35                Alternative( Alternative&& other ) = default;
     36                Alternative & operator= ( Alternative&& other ) = default;
    3637
    3738                void print( std::ostream &os, Indenter indent = {} ) const;
    3839
    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 
    4640                Cost cost;
    4741                Cost cvtCost;
    48                 Expression *expr;
     42                Expression * expr;
    4943                TypeEnvironment env;
    5044        };
     
    6256                return os;
    6357        }
     58
     59        const GC& operator<< ( const GC&, const Alternative& );
    6460} // namespace ResolvExpr
    6561
Note: See TracChangeset for help on using the changeset viewer.