size_type size() const;
size_type size() const noexcept;
123456789101112131415
// map::size #include <iostream> #include <map> int main () { std::map<char,int> mymap; mymap['a']=101; mymap['b']=202; mymap['c']=302; std::cout << "mymap.size() is " << mymap.size() << '\n'; return 0; }
mymap.size() is 3