home | login | register | DMCA | contacts | help | donate |      

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


my bookshelf | genres | recommend | rating of books | rating of authors | reviews | new | форум | collections | читалки | авторам | add
fantasy
space fantasy
fantasy is horrors
heroic
prose
  military
  child
  russian
detective
  action
  child
  ironical
  historical
  political
western
adventure
adventure (child)
child's stories
love
religion
antique
Scientific literature
biography
business
home pets
animals
art
history
computers
linguistics
mathematics
religion
home_garden
sport
technique
publicism
philosophy
chemistry
close

Loading...


Expression semantics

Name Expression Precondition Semantics Postcondition
Default constructor X() X a; Creates an empty container. The size of the container is 0.
Erase key a.erase(k) Destroys all elements whose key is the same as k, and removes them from a. [2] The return value is the number of elements that were erased, i.e. the old value of a.count(k). a.size() is decremented by a.count(k). a contains no elements with key k.
Erase element a.erase(p) p is a dereferenceable iterator in a. Destroys the element pointed to by p, and removes it from a. a.size() is decremented by 1.
Erase range a.erase(p, q) [p, q) is a valid range in a. Destroys the elements in the range [p,q) and removes them from a. a.size() is decremented by the distance from i to j.
Clear a.clear() Equivalent to a.erase(a.begin(), a.end())
Find a.find(k) Returns an iterator pointing to an element whose key is the same as k, or a.end() if no such element exists. Either the return value is a.end(), or else the return value has a key that is the same as k.
Count a.count(k) Returns the number of elements in a whose keys are the same as k.
Equal range a.equal_range(k) Returns a pair P such that [P.first, P.second) is a range containing all elements in a whose keys are the same as k. [3] If no elements have the same key as k, the return value is an empty range. The distance between P.first and P.second is equal to a.count(k) . If p is a dereferenceable iterator in a, then either p lies in the range [P.first, P.second), or else *p has a key that is not the same as k.


Valid expressions | Standard Template Library Programmer`s Guide | Complexity guarantees







Loading...