Home | History | Annotate | Download | only in brillo

Lines Matching defs:vector

11 #include <vector>
24 // Given an STL map, returns a vector containing all keys from the map.
25 // The keys in the vector are sorted.
27 inline std::vector<typename T::key_type> GetMapKeysAsVector(const T& map) {
28 std::vector<typename T::key_type> keys;
35 // Given an STL map, returns a vector containing all values from the map.
37 inline std::vector<typename T::mapped_type> GetMapValues(const T& map) {
38 std::vector<typename T::mapped_type> values;
45 // Given an STL map, returns a vector of key-value pairs from the map.
47 inline std::vector<std::pair<typename T::key_type, typename T::mapped_type>>
49 std::vector<std::pair<typename T::key_type, typename T::mapped_type>> vector;
50 vector.reserve(map.size());
52 vector.push_back(pair);
53 return vector;