MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / toVector

Function toVector

Modules/hal-device-module/source/hal/Device.cpp:71–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70template<typename R>
71auto toVector(R&& range) {
72 using T = std::ranges::range_value_t<R>;
73 std::vector<T> result;
74 if constexpr (std::ranges::common_range<R>) {
75 result.reserve(std::ranges::distance(range));
76 }
77 std::ranges::copy(range, std::back_inserter(result));
78 return result;
79}
80
81std::vector<std::shared_ptr<Device>> findDevices(const std::function<bool(const std::shared_ptr<Device>&)>& filterFunction) {
82 auto scoped_mutex = mutex.asScopedLock();

Callers 1

findDevicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected