| 224 | decltype(std::begin(std::declval<const U&>())), |
| 225 | decltype(std::end(std::declval<const U&>()))>::type> |
| 226 | static OwnedVector<T> Of(const U& collection) { |
| 227 | Iterator begin = std::begin(collection); |
| 228 | Iterator end = std::end(collection); |
| 229 | using non_const_t = typename std::remove_const<T>::type; |
| 230 | auto vec = |
| 231 | OwnedVector<non_const_t>::NewForOverwrite(std::distance(begin, end)); |
| 232 | std::copy(begin, end, vec.start()); |
| 233 | return vec; |
| 234 | } |
| 235 | |
| 236 | bool operator==(std::nullptr_t) const { return data_ == nullptr; } |
| 237 | bool operator!=(std::nullptr_t) const { return data_ != nullptr; } |
nothing calls this directly
no test coverage detected