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

Allow setting the state directory as a store parameter

E.g. "local?store=/tmp/store&state=/tmp/var".
This commit is contained in:
Eelco Dolstra 2016-06-02 13:33:49 +02:00
parent f2682e6e18
commit 812c0dfbe2
13 changed files with 112 additions and 77 deletions

View file

@ -45,19 +45,30 @@ public:
return *p;
}
operator std::shared_ptr<T> ()
operator std::shared_ptr<T> () const
{
return p;
}
std::shared_ptr<T> get_ptr() const
{
return p;
}
template<typename T2>
ref<T2> cast()
ref<T2> cast() const
{
return ref<T2>(std::dynamic_pointer_cast<T2>(p));
}
template<typename T2>
operator ref<T2> ()
std::shared_ptr<T2> dynamic_pointer_cast() const
{
return std::dynamic_pointer_cast<T2>(p);
}
template<typename T2>
operator ref<T2> () const
{
return ref<T2>((std::shared_ptr<T2>) p);
}