As far as I looked through the C++ reference, there is no function which returns a vector (or similar) containing all the keywords of a map. Why is this so? This is not a super important function, but sometimes it can be useful. (I don't exactly understand the key_comp function, but this seems to be not what I'm looking for)
Just for completeness, here is some function which does what I want:
template<typename key_t, typename value_t>
std::vector<key_t> getKeywords(const std::map<key_t, value_t>& m){
std::vector<key_t> keywords;
for(const auto& it: m){
keywords.push_back(it.first);
}
return keywords;
}