Top "Stdmap" questions

std::map is a class in the C++ Standard Library.

C++ std::map holding ANY type of value

Basically I want MyClass that holds a Hashmap that maps Field name(string) to ANY type of Value.. For this …

c++ templates stl stdmap stdany
How can i estimate memory usage of std::map?

For example, I have a std::map with known sizeof(A) and sizeof(B), while map has N entries inside. …

c++ memory stl stdmap
How can I find the minimum value in a map?

I have a map and I want to find the minimum value (right-hand side) in the map. Here is how …

c++ dictionary stl stdmap minimum
find element with max value from std::map

I'm trying to get the element with max value from std::map, int main() { map<int, int> m; …

c++ std stdmap
Why Can't I store references in a `std::map` in C++?

I understand that references are not pointers, but an alias to an object. However, I still don't understand what exactly …

c++ dictionary reference std stdmap
Most efficient way to assign values to maps

Which way to assign values to a map is most efficient? Or are they all optimized to the same code (…

c++ dictionary std stdmap c++-standard-library
Checking for existence in std::map - count vs find

So there seem to be two generally acceptable methods of determining whether or not a key exists in a std::…

c++ map stl stdmap
How can I append the content of one map to another map?

I have the following two maps: map< string, list < string > > map1; map< string, list < …

c++ visual-c++ stl append stdmap
When I should use std::map::at to retrieve map element

I have read different articles on web and questions at stackoverflow, but for me it is not clear is there …

c++ c++11 stdmap
Why is memory still accessible after std::map::clear() is called?

I am observing strange behaviour of std::map::clear(). This method is supposed to call element's destructor when called, however …

c++ stdmap