MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / main

Function main

03.20-rangesCustomAdaptor1/main.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18int main()
19{
20 const std::vector prices{3.95, 6.0, 95.4, 10.95, 12.90, 5.50};
21
22 auto subView =
23 prices |
24 std::views::filter([](auto e) { return e < 10.0; })
25 // #A Use the adaptor as usual
26 | addCurrency(" €");
27
28 for(const auto& e : subView) { std::cout << e << '\n'; }
29}

Callers

nothing calls this directly

Calls 1

addCurrencyFunction · 0.85

Tested by

no test coverage detected