Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ref< T > Class Template Reference

#include <ref.hh>

Public Member Functions

 ref (const ref< T > &r)
 
 ref (const std::shared_ptr< T > &p)
 
 ref (T *p)
 
T * operator-> () const
 
T & operator* () const
 
 operator std::shared_ptr< T > () const
 
std::shared_ptr< T > get_ptr () const
 
template<typename T2 >
ref< T2 > cast () const
 
template<typename T2 >
std::shared_ptr< T2 > dynamic_pointer_cast () const
 
template<typename T2 >
 operator ref< T2 > () const
 
ref< T > & operator= (ref< T > const &rhs)=default
 
bool operator== (const ref< T > &other) const
 
bool operator!= (const ref< T > &other) const
 
bool operator< (const ref< T > &other) const
 

Friends

template<typename T2 , typename... Args>
ref< T2 > make_ref (Args &&... args)
 

Detailed Description

template<typename T>
class nix::ref< T >

A simple non-nullable reference-counted pointer. Actually a wrapper around std::shared_ptr that prevents null constructions.


The documentation for this class was generated from the following file: