1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Add a copyStorePath() utility function

This commit is contained in:
Eelco Dolstra 2016-05-03 14:45:50 +02:00
parent 80f739b571
commit dfebfc835f
5 changed files with 27 additions and 10 deletions

View file

@ -28,6 +28,13 @@ public:
throw std::invalid_argument("null pointer cast to ref");
}
explicit ref<T>(T * p)
: p(p)
{
if (!p)
throw std::invalid_argument("null pointer cast to ref");
}
T* operator ->() const
{
return &*p;