1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 03:23:16 +02:00

Get rid of CBox

This commit is contained in:
Eelco Dolstra 2019-12-13 18:29:16 +01:00
parent 5a6d6da7ae
commit ca87707c90
4 changed files with 10 additions and 46 deletions

View file

@ -180,24 +180,4 @@ struct Result
}
};
template<typename T>
struct CBox
{
T * ptr;
T * operator ->()
{
return ptr;
}
CBox(T * ptr) : ptr(ptr) { }
CBox(const CBox &) = delete;
CBox(CBox &&) = delete;
~CBox()
{
free(ptr);
}
};
}