Changeset fdbd4fd for src/AST/Node.hpp


Ignore:
Timestamp:
May 13, 2019, 4:55:27 PM (3 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
arm-eh, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
9b81fed
Parents:
336d0b3
Message:

Add dynamic_cast as method to ptr_base

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r336d0b3 rfdbd4fd  
    133133        operator const node_t * const() const { return node; }
    134134
     135        template<typename o_node_t>
     136        const o_node_t * as() const { return dynamic_cast<o_node_t *>(node); }
     137
    135138        using ptr = const node_t *;
    136139
Note: See TracChangeset for help on using the changeset viewer.