sparrow 0.3.0
Loading...
Searching...
No Matches
memory.hpp File Reference
#include <compare>
#include <concepts>
#include <cstddef>
#include <memory>
#include <type_traits>
#include "sparrow/utils/contracts.hpp"
Include dependency graph for memory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sparrow::value_ptr< T >
 A value_ptr is a smart pointer that behaves like a value. More...
 
struct  sparrow::detail::is_unique_ptr< T >
 
struct  sparrow::detail::is_unique_ptr< std::unique_ptr< T, D > >
 
class  sparrow::cloning_ptr< T >
 Smart pointer behaving like a copiable std::unique_ptr. More...
 

Namespaces

namespace  sparrow
 
namespace  sparrow::detail
 

Concepts

concept  sparrow::clonable
 Matches types that provide a clone method.
 

Functions

template<class T>
void sparrow::swap (cloning_ptr< T > &lhs, cloning_ptr< T > &rhs) noexcept
 
template<class T1, class T2>
requires std::equality_comparable_with<typename cloning_ptr<T1>::pointer, typename cloning_ptr<T2>::pointer>
constexpr bool sparrow::operator== (const cloning_ptr< T1 > &lhs, const cloning_ptr< T2 > &rhs) noexcept
 
template<class T1, class T2>
requires std::three_way_comparable_with<typename cloning_ptr<T1>::pointer, typename cloning_ptr<T2>::pointer>
constexpr std::compare_three_way_result_t< typename cloning_ptr< T1 >::pointer, typename cloning_ptr< T2 >::pointer > sparrow::operator<=> (const cloning_ptr< T1 > &lhs, const cloning_ptr< T2 > &rhs) noexcept
 
template<class T>
constexpr bool sparrow::operator== (const cloning_ptr< T > &lhs, std::nullptr_t) noexcept
 
template<class T>
requires std::three_way_comparable<typename cloning_ptr<T>::pointer>
constexpr std::compare_three_way_result_t< typename cloning_ptr< T >::pointer > sparrow::operator<=> (const cloning_ptr< T > &lhs, std::nullptr_t) noexcept
 
template<class T, class... Args>
cloning_ptr< T > sparrow::make_cloning_ptr (Args &&... args)
 

Variables

template<class T>
constexpr bool sparrow::detail::is_unique_ptr_v = is_unique_ptr<T>::value