• Home
  • Raw
  • Download

Lines Matching refs:U

46   template <typename U>
47 Maybe(const Maybe<U>& rhs); // NOLINT(google-explicit-constructor)
51 template <typename U>
52 Maybe(Maybe<U>&& rhs); // NOLINT(google-explicit-constructor)
56 template <typename U>
57 Maybe& operator=(const Maybe<U>& rhs);
61 template <typename U>
62 Maybe& operator=(Maybe<U>&& rhs);
95 template <typename U>
98 template <typename U>
99 Maybe& copy(const Maybe<U>& rhs);
101 template <typename U>
102 Maybe& move(Maybe<U>&& rhs);
129 template <typename U>
130 Maybe<T>::Maybe(const Maybe<U>& rhs) : nothing_(rhs.nothing_) { in Maybe()
132 new (&storage_) T(reinterpret_cast<const U&>(rhs.storage_)); in Maybe()
148 template <typename U>
149 Maybe<T>::Maybe(Maybe<U>&& rhs) : nothing_(rhs.nothing_) { in Maybe()
154 new (&storage_) T(std::move(reinterpret_cast<U&>(rhs.storage_))); in Maybe()
166 template <typename U>
167 inline Maybe<T>& Maybe<T>::operator=(const Maybe<U>& rhs) {
172 template <typename U>
173 Maybe<T>& Maybe<T>::copy(const Maybe<U>& rhs) { in copy()
179 reinterpret_cast<T&>(storage_) = reinterpret_cast<const U&>(rhs.storage_); in copy()
185 new (&storage_) T(reinterpret_cast<const U&>(rhs.storage_)); in copy()
201 template <typename U>
202 inline Maybe<T>& Maybe<T>::operator=(Maybe<U>&& rhs) {
203 return move(std::forward<Maybe<U>>(rhs));
207 template <typename U>
208 Maybe<T>& Maybe<T>::move(Maybe<U>&& rhs) { in move()
216 std::move(reinterpret_cast<U&>(rhs.storage_)); in move()
224 new (&storage_) T(std::move(reinterpret_cast<U&>(rhs.storage_))); in move()
287 template <typename T, typename U>
288 typename std::enable_if<has_eq_op<T, U>::value, bool>::type operator==(const Maybe<T>& a,
289 const Maybe<U>& b) {
298 template <typename T, typename U>
299 typename std::enable_if<has_eq_op<T, U>::value, bool>::type operator==(const Maybe<T>& a,
300 const U& b) {
305 template <typename T, typename U>
306 typename std::enable_if<has_eq_op<T, U>::value, bool>::type operator!=(const Maybe<T>& a,
307 const Maybe<U>& b) {
311 template <typename T, typename U>
312 typename std::enable_if<has_lt_op<T, U>::value, bool>::type operator<(const Maybe<T>& a,
313 const Maybe<U>& b) {