MCPcopy Create free account
hub / github.com/ConorWilliams/libfork / check

Function check

test/source/algorithm/scan.cpp:165–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164template <typename Bop, typename Proj>
165auto check(Bop bop, Proj proj) {
166 return [bop, proj]<class T>(std::vector<T> const &in) {
167 //
168
169 std::vector<T> tmp;
170
171 for (auto &&elem : in) {
172 tmp.push_back(proj(elem));
173 }
174
175 std::vector<T> out(in.size());
176
177 std::inclusive_scan(tmp.begin(), tmp.end(), out.begin(), bop);
178
179 return out;
180 };
181}
182
183auto doubler = [](auto const &X) -> decltype(2 * X) {
184 return 2 * X;

Callers 2

testFunction · 0.70
scan.cppFile · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected