Changeset 302ef2a for src/AST/Node.hpp


Ignore:
Timestamp:
Dec 22, 2020, 3:16:47 PM (2 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2daea42
Parents:
797a193
Message:

smart pointer memory safety

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r797a193 r302ef2a  
    229229        const node_t & operator* () const { _check(); return *node; }
    230230        explicit operator bool() const { _check(); return node; }
    231         operator const node_t * () const { _check(); return node; }
     231        operator const node_t * () const & { _check(); return node; }
     232        operator const node_t * () && = delete;
    232233
    233234        const node_t * release() {
Note: See TracChangeset for help on using the changeset viewer.