MCPcopy Create free account
hub / github.com/NativeScript/android / Of

Function Of

test-app/runtime/src/main/cpp/v8_inspector/src/base/vector.h:226–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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; }

Callers

nothing calls this directly

Calls 4

NewForOverwriteFunction · 0.85
beginFunction · 0.70
endFunction · 0.70
startMethod · 0.65

Tested by

no test coverage detected