Lines Matching refs:Unwrap
50 static auto Unwrap(B &x) -> Constify<A, B> * {
60 static auto Unwrap(B *p) -> Constify<A, B> * {
62 return Unwrap<A>(*p);
69 static auto Unwrap(const std::unique_ptr<B> &p) -> Constify<A, B> * {
71 return Unwrap<A>(*p);
78 static auto Unwrap(const std::shared_ptr<B> &p) -> Constify<A, B> * {
80 return Unwrap<A>(*p);
87 static auto Unwrap(std::optional<B> &x) -> Constify<A, B> * {
89 return Unwrap<A>(*x);
96 static auto Unwrap(const std::optional<B> &x) -> Constify<A, B> * {
98 return Unwrap<A>(*x);
105 static A *Unwrap(std::variant<Bs...> &u) { in Unwrap() function
108 using Ty = std::decay_t<decltype(Unwrap<A>(x))>; in Unwrap()
111 return Unwrap<A>(x); in Unwrap()
119 static auto Unwrap(const std::variant<Bs...> &u) -> std::add_const_t<A> * {
121 [](const auto &x) -> std::add_const_t<A> * { return Unwrap<A>(x); }, u);
125 static auto Unwrap(const Reference<B> &ref) -> Constify<A, B> * {
126 return Unwrap<A>(*ref);
130 static auto Unwrap(const Indirection<B, COPY> &p) -> Constify<A, B> * {
131 return Unwrap<A>(*p);
135 static auto Unwrap(const CountedReference<B> &p) -> Constify<A, B> * {
137 return Unwrap<A>(*p);
144 template <typename A, typename B> auto Unwrap(B &x) -> Constify<A, B> * {
145 return UnwrapperHelper::Unwrap<A>(x);
150 if (const A * p{Unwrap<A>(x)}) { in UnwrapCopy()