Changeset 1341ce1


Ignore:
Timestamp:
Sep 7, 2021, 12:25:52 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
2bfee8e
Parents:
0156cdd
Message:

Simple release function on unique_ptrs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/memory.cfa

    r0156cdd r1341ce1  
    155155
    156156forall(T &)
     157T * release(unique_ptr(T) & this) {
     158        T * data = this.data;
     159        this.data = 0p;
     160        return data;
     161}
     162
     163forall(T &)
    157164int ?==?(unique_ptr(T) const & this, unique_ptr(T) const & that) {
    158165        return this.data == that.data;
Note: See TracChangeset for help on using the changeset viewer.