Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Label.hpp

    r6d51bd7 re0115286  
    3535
    3636        Label( CodeLocation loc, const std::string& name = "",
    37                 std::vector<ptr<Attribute>> && attrs = std::vector<ptr<Attribute>>{} )
     37                const std::vector<ptr<Attribute>>& attrs = std::vector<ptr<Attribute>>{} )
    3838        : location( loc ), name( name ), attributes( attrs ) {}
    3939
     
    4848inline std::ostream& operator<< ( std::ostream& out, const Label& l ) { return out << l.name; }
    4949
     50
     51//=================================================================================================
     52/// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency
     53/// remove only if there is a better solution
     54/// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with
     55/// forward declarations
     56inline void increment( const class Label * node, Node::ref_type ref ) { node->increment( ref ); }
     57inline void decrement( const class Label * node, Node::ref_type ref ) { node->decrement( ref ); }
     58
    5059}
    5160
Note: See TracChangeset for help on using the changeset viewer.