Added additional 'map' functions.

This commit is contained in:
yhirose 2015-03-04 18:26:11 -05:00
parent fb42532c7c
commit 0fa6af3cd5

View File

@ -248,6 +248,16 @@ struct SemanticValues : protected std::vector<SemanticValue>
}
return r;
}
template <typename T>
auto map() const -> vector<T> {
return this->map([](const SemanticValue& v) { return v.get<T>(); });
}
template <typename T, typename It>
auto map(It beg, It end) const -> vector<T> {
return this->map(beg, end, [](const SemanticValue& v) { return v.get<T>(); });
}
};
/*