1 #ifndef FWCore_Utilities_transform_h
2 #define FWCore_Utilities_transform_h
10 template <
typename InputType,
typename Function>
12 typename std::remove_cv<
typename std::remove_reference<decltype(predicate(
input.front()))>
::type>
::type> {
14 typename std::remove_cv<
typename std::remove_reference<decltype(predicate(
input.front()))>
::type>
::type;
15 std::vector<ReturnType>
output;
16 output.reserve(
input.size());
17 for (
auto const& element :
input)
18 output.push_back(predicate(element));
24 #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
std::map< DetId, double > ReturnType