MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / transform_convert

Function transform_convert

include/fplus/container_common.hpp:652–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650// use an output container type different from the input container type.
651template <typename ContainerOut, typename F, typename ContainerIn>
652ContainerOut transform_convert(F f, const ContainerIn& xs)
653{
654 internal::trigger_static_asserts<internal::unary_function_tag, F, typename ContainerIn::value_type>();
655 ContainerOut ys;
656 internal::prepare_container(ys, size_of_cont(xs));
657 auto it = internal::get_back_inserter(ys);
658 std::transform(std::begin(xs), std::end(xs), it, f);
659 return ys;
660}
661
662// API search type: transform_inner : ((a -> b), [[a]]) -> [[b]]
663// fwd bind count: 1

Callers

nothing calls this directly

Calls 4

prepare_containerFunction · 0.70
size_of_contFunction · 0.70
get_back_inserterFunction · 0.70
transformFunction · 0.70

Tested by

no test coverage detected