Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
box_ptr.hh File Reference
#include <concepts>
#include <memory>
#include <stdexcept>
#include <type_traits>
#include <assert.h>

Go to the source code of this file.

Classes

class  nix::box_ptr< T >

Macros

#define MAKE_COMPARISON(OP)

Functions

template<typename T>
requires std::equality_comparable<T>
bool nix::operator== (box_ptr< T > const &x, box_ptr< T > const &y)
template<typename T>
requires std::equality_comparable<T>
bool nix::operator!= (box_ptr< T > const &x, box_ptr< T > const &y)
 nix::MAKE_COMPARISON (<)
 nix::MAKE_COMPARISON (>=)
 nix::MAKE_COMPARISON (<=)
template<typename T>
requires std::three_way_comparable<T>
std::compare_three_way_result_t< T, T > nix::operator<=> (box_ptr< T > const &x, box_ptr< T > const &y)
template<typename T, typename... Args>
box_ptr< T > nix::make_box_ptr (Args &&... args)

Macro Definition Documentation

◆ MAKE_COMPARISON

#define MAKE_COMPARISON ( OP)
Value:
template<typename T> \
requires std::totally_ordered<T> \
bool operator OP(box_ptr<T> const & x, box_ptr<T> const & y) \
{ \
return *x OP * y; \
}