28#ifndef DOXYGEN_SHOULD_SKIP_THIS
47 : m_ptr(std::addressof(ref))
60 Ref(
const Ref& other)
noexcept =
default;
65 template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
67 : m_ptr(std::addressof(other.get()))
79 template<typename U, typename = std::enable_if_t<std::is_base_of<T, U>::value>>
81 m_ptr = std::addressof(other.get());
98 operator T& ()
const noexcept {
114 return std::addressof(lhs.get()) == std::addressof(rhs.get());
125 return std::addressof(lhs.get()) == std::addressof(rhs);
136 return std::addressof(lhs) == std::addressof(rhs.get());
148#ifndef DOXYGEN_SHOULD_SKIP_THIS
150 Ref<T> ref(
const T&&) =
delete;
153#ifndef DOXYGEN_SHOULD_SKIP_THIS
A reference wrapper.
Definition: Ref.h:39
Ref & operator=(const Ref< U > &other) noexcept
Copy assignment.
Definition: Ref.h:80
constexpr bool operator==(Ref< T > lhs, const T &rhs) noexcept
Referece comparison.
Definition: Ref.h:124
Ref(const Ref< U > &other) noexcept
Copy constructor.
Definition: Ref.h:66
Ref(T &&)=delete
Deleted constructor with rvalue reference.
Ref(const Ref &other) noexcept=default
Copy constructor.
constexpr bool operator==(const T &lhs, Ref< T > rhs) noexcept
Referece comparison.
Definition: Ref.h:135
constexpr bool operator==(Ref< T > lhs, Ref< T > rhs) noexcept
Referece comparison.
Definition: Ref.h:113
Ref & operator=(const Ref &other) noexcept=default
Copy assignment.
Ref(T &ref) noexcept
Constructor with a lvalue reference.
Definition: Ref.h:46
T & get() const noexcept
Get the reference.
Definition: Ref.h:89
Ref< T > ref(T &object)
Reference creation.
Definition: Ref.h:144
The namespace for gf classes.