1 #ifndef FWCore_Utilities_transform_h
2 #define FWCore_Utilities_transform_h
10 template <
typename InputType,
typename Function>
13 using ReturnType =
typename std::remove_cv<
typename std::remove_reference<decltype(predicate(
input.front()))>
::type>
::type;
14 std::vector<ReturnType>
output;
15 output.reserve(
input.size() );
16 for (
auto const & element :
input)
17 output.push_back(predicate(element));
23 #endif // FWCore_Utilities_transform_h
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
static std::string const input