Install gcc-4.3.3-tdm-1-g++.tar.gz
[msysgit.git] / mingw / lib / gcc / mingw32 / 4.3.3 / include / c++ / bits / stl_multimap.h
blobc36bb8a9a72f54c457b280c075de4bb76b4fe652
1 // Multimap implementation -*- C++ -*-
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4 // Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING. If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction. Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License. This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
33 * Copyright (c) 1994
34 * Hewlett-Packard Company
36 * Permission to use, copy, modify, distribute and sell this software
37 * and its documentation for any purpose is hereby granted without fee,
38 * provided that the above copyright notice appear in all copies and
39 * that both that copyright notice and this permission notice appear
40 * in supporting documentation. Hewlett-Packard Company makes no
41 * representations about the suitability of this software for any
42 * purpose. It is provided "as is" without express or implied warranty.
45 * Copyright (c) 1996,1997
46 * Silicon Graphics Computer Systems, Inc.
48 * Permission to use, copy, modify, distribute and sell this software
49 * and its documentation for any purpose is hereby granted without fee,
50 * provided that the above copyright notice appear in all copies and
51 * that both that copyright notice and this permission notice appear
52 * in supporting documentation. Silicon Graphics makes no
53 * representations about the suitability of this software for any
54 * purpose. It is provided "as is" without express or implied warranty.
57 /** @file stl_multimap.h
58 * This is an internal header file, included by other library headers.
59 * You should not attempt to use it directly.
62 #ifndef _STL_MULTIMAP_H
63 #define _STL_MULTIMAP_H 1
65 #include <bits/concept_check.h>
67 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
69 /**
70 * @brief A standard container made up of (key,value) pairs, which can be
71 * retrieved based on a key, in logarithmic time.
73 * @ingroup Containers
74 * @ingroup Assoc_containers
76 * Meets the requirements of a <a href="tables.html#65">container</a>, a
77 * <a href="tables.html#66">reversible container</a>, and an
78 * <a href="tables.html#69">associative container</a> (using equivalent
79 * keys). For a @c multimap<Key,T> the key_type is Key, the mapped_type
80 * is T, and the value_type is std::pair<const Key,T>.
82 * Multimaps support bidirectional iterators.
84 * The private tree data is declared exactly the same way for map and
85 * multimap; the distinction is made entirely in how the tree functions are
86 * called (*_unique versus *_equal, same as the standard).
88 template <typename _Key, typename _Tp,
89 typename _Compare = std::less<_Key>,
90 typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
91 class multimap
93 public:
94 typedef _Key key_type;
95 typedef _Tp mapped_type;
96 typedef std::pair<const _Key, _Tp> value_type;
97 typedef _Compare key_compare;
98 typedef _Alloc allocator_type;
100 private:
101 // concept requirements
102 typedef typename _Alloc::value_type _Alloc_value_type;
103 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
104 __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
105 _BinaryFunctionConcept)
106 __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
108 public:
109 class value_compare
110 : public std::binary_function<value_type, value_type, bool>
112 friend class multimap<_Key, _Tp, _Compare, _Alloc>;
113 protected:
114 _Compare comp;
116 value_compare(_Compare __c)
117 : comp(__c) { }
119 public:
120 bool operator()(const value_type& __x, const value_type& __y) const
121 { return comp(__x.first, __y.first); }
124 private:
125 /// This turns a red-black tree into a [multi]map.
126 typedef typename _Alloc::template rebind<value_type>::other
127 _Pair_alloc_type;
129 typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
130 key_compare, _Pair_alloc_type> _Rep_type;
131 /// The actual tree structure.
132 _Rep_type _M_t;
134 public:
135 // many of these are specified differently in ISO, but the following are
136 // "functionally equivalent"
137 typedef typename _Pair_alloc_type::pointer pointer;
138 typedef typename _Pair_alloc_type::const_pointer const_pointer;
139 typedef typename _Pair_alloc_type::reference reference;
140 typedef typename _Pair_alloc_type::const_reference const_reference;
141 typedef typename _Rep_type::iterator iterator;
142 typedef typename _Rep_type::const_iterator const_iterator;
143 typedef typename _Rep_type::size_type size_type;
144 typedef typename _Rep_type::difference_type difference_type;
145 typedef typename _Rep_type::reverse_iterator reverse_iterator;
146 typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
148 // [23.3.2] construct/copy/destroy
149 // (get_allocator() is also listed in this section)
151 * @brief Default constructor creates no elements.
153 multimap()
154 : _M_t() { }
157 * @brief Creates a %multimap with no elements.
158 * @param comp A comparison object.
159 * @param a An allocator object.
161 explicit
162 multimap(const _Compare& __comp,
163 const allocator_type& __a = allocator_type())
164 : _M_t(__comp, __a) { }
167 * @brief %Multimap copy constructor.
168 * @param x A %multimap of identical element and allocator types.
170 * The newly-created %multimap uses a copy of the allocation object
171 * used by @a x.
173 multimap(const multimap& __x)
174 : _M_t(__x._M_t) { }
176 #ifdef __GXX_EXPERIMENTAL_CXX0X__
178 * @brief %Multimap move constructor.
179 * @param x A %multimap of identical element and allocator types.
181 * The newly-created %multimap contains the exact contents of @a x.
182 * The contents of @a x are a valid, but unspecified %multimap.
184 multimap(multimap&& __x)
185 : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
186 #endif
189 * @brief Builds a %multimap from a range.
190 * @param first An input iterator.
191 * @param last An input iterator.
193 * Create a %multimap consisting of copies of the elements from
194 * [first,last). This is linear in N if the range is already sorted,
195 * and NlogN otherwise (where N is distance(first,last)).
197 template<typename _InputIterator>
198 multimap(_InputIterator __first, _InputIterator __last)
199 : _M_t()
200 { _M_t._M_insert_equal(__first, __last); }
203 * @brief Builds a %multimap from a range.
204 * @param first An input iterator.
205 * @param last An input iterator.
206 * @param comp A comparison functor.
207 * @param a An allocator object.
209 * Create a %multimap consisting of copies of the elements from
210 * [first,last). This is linear in N if the range is already sorted,
211 * and NlogN otherwise (where N is distance(first,last)).
213 template<typename _InputIterator>
214 multimap(_InputIterator __first, _InputIterator __last,
215 const _Compare& __comp,
216 const allocator_type& __a = allocator_type())
217 : _M_t(__comp, __a)
218 { _M_t._M_insert_equal(__first, __last); }
220 // FIXME There is no dtor declared, but we should have something generated
221 // by Doxygen. I don't know what tags to add to this paragraph to make
222 // that happen:
224 * The dtor only erases the elements, and note that if the elements
225 * themselves are pointers, the pointed-to memory is not touched in any
226 * way. Managing the pointer is the user's responsibility.
230 * @brief %Multimap assignment operator.
231 * @param x A %multimap of identical element and allocator types.
233 * All the elements of @a x are copied, but unlike the copy constructor,
234 * the allocator object is not copied.
236 multimap&
237 operator=(const multimap& __x)
239 _M_t = __x._M_t;
240 return *this;
243 #ifdef __GXX_EXPERIMENTAL_CXX0X__
245 * @brief %Multimap move assignment operator.
246 * @param x A %multimap of identical element and allocator types.
248 * The contents of @a x are moved into this multimap (without copying).
249 * @a x is a valid, but unspecified multimap.
251 multimap&
252 operator=(multimap&& __x)
254 // NB: DR 675.
255 this->clear();
256 this->swap(__x);
257 return *this;
259 #endif
261 /// Get a copy of the memory allocation object.
262 allocator_type
263 get_allocator() const
264 { return _M_t.get_allocator(); }
266 // iterators
268 * Returns a read/write iterator that points to the first pair in the
269 * %multimap. Iteration is done in ascending order according to the
270 * keys.
272 iterator
273 begin()
274 { return _M_t.begin(); }
277 * Returns a read-only (constant) iterator that points to the first pair
278 * in the %multimap. Iteration is done in ascending order according to
279 * the keys.
281 const_iterator
282 begin() const
283 { return _M_t.begin(); }
286 * Returns a read/write iterator that points one past the last pair in
287 * the %multimap. Iteration is done in ascending order according to the
288 * keys.
290 iterator
291 end()
292 { return _M_t.end(); }
295 * Returns a read-only (constant) iterator that points one past the last
296 * pair in the %multimap. Iteration is done in ascending order according
297 * to the keys.
299 const_iterator
300 end() const
301 { return _M_t.end(); }
304 * Returns a read/write reverse iterator that points to the last pair in
305 * the %multimap. Iteration is done in descending order according to the
306 * keys.
308 reverse_iterator
309 rbegin()
310 { return _M_t.rbegin(); }
313 * Returns a read-only (constant) reverse iterator that points to the
314 * last pair in the %multimap. Iteration is done in descending order
315 * according to the keys.
317 const_reverse_iterator
318 rbegin() const
319 { return _M_t.rbegin(); }
322 * Returns a read/write reverse iterator that points to one before the
323 * first pair in the %multimap. Iteration is done in descending order
324 * according to the keys.
326 reverse_iterator
327 rend()
328 { return _M_t.rend(); }
331 * Returns a read-only (constant) reverse iterator that points to one
332 * before the first pair in the %multimap. Iteration is done in
333 * descending order according to the keys.
335 const_reverse_iterator
336 rend() const
337 { return _M_t.rend(); }
339 #ifdef __GXX_EXPERIMENTAL_CXX0X__
341 * Returns a read-only (constant) iterator that points to the first pair
342 * in the %multimap. Iteration is done in ascending order according to
343 * the keys.
345 const_iterator
346 cbegin() const
347 { return _M_t.begin(); }
350 * Returns a read-only (constant) iterator that points one past the last
351 * pair in the %multimap. Iteration is done in ascending order according
352 * to the keys.
354 const_iterator
355 cend() const
356 { return _M_t.end(); }
359 * Returns a read-only (constant) reverse iterator that points to the
360 * last pair in the %multimap. Iteration is done in descending order
361 * according to the keys.
363 const_reverse_iterator
364 crbegin() const
365 { return _M_t.rbegin(); }
368 * Returns a read-only (constant) reverse iterator that points to one
369 * before the first pair in the %multimap. Iteration is done in
370 * descending order according to the keys.
372 const_reverse_iterator
373 crend() const
374 { return _M_t.rend(); }
375 #endif
377 // capacity
378 /** Returns true if the %multimap is empty. */
379 bool
380 empty() const
381 { return _M_t.empty(); }
383 /** Returns the size of the %multimap. */
384 size_type
385 size() const
386 { return _M_t.size(); }
388 /** Returns the maximum size of the %multimap. */
389 size_type
390 max_size() const
391 { return _M_t.max_size(); }
393 // modifiers
395 * @brief Inserts a std::pair into the %multimap.
396 * @param x Pair to be inserted (see std::make_pair for easy creation
397 * of pairs).
398 * @return An iterator that points to the inserted (key,value) pair.
400 * This function inserts a (key, value) pair into the %multimap.
401 * Contrary to a std::map the %multimap does not rely on unique keys and
402 * thus multiple pairs with the same key can be inserted.
404 * Insertion requires logarithmic time.
406 iterator
407 insert(const value_type& __x)
408 { return _M_t._M_insert_equal(__x); }
411 * @brief Inserts a std::pair into the %multimap.
412 * @param position An iterator that serves as a hint as to where the
413 * pair should be inserted.
414 * @param x Pair to be inserted (see std::make_pair for easy creation
415 * of pairs).
416 * @return An iterator that points to the inserted (key,value) pair.
418 * This function inserts a (key, value) pair into the %multimap.
419 * Contrary to a std::map the %multimap does not rely on unique keys and
420 * thus multiple pairs with the same key can be inserted.
421 * Note that the first parameter is only a hint and can potentially
422 * improve the performance of the insertion process. A bad hint would
423 * cause no gains in efficiency.
425 * For more on "hinting," see:
426 * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
428 * Insertion requires logarithmic time (if the hint is not taken).
430 iterator
431 insert(iterator __position, const value_type& __x)
432 { return _M_t._M_insert_equal_(__position, __x); }
435 * @brief A template function that attempts to insert a range
436 * of elements.
437 * @param first Iterator pointing to the start of the range to be
438 * inserted.
439 * @param last Iterator pointing to the end of the range.
441 * Complexity similar to that of the range constructor.
443 template<typename _InputIterator>
444 void
445 insert(_InputIterator __first, _InputIterator __last)
446 { _M_t._M_insert_equal(__first, __last); }
449 * @brief Erases an element from a %multimap.
450 * @param position An iterator pointing to the element to be erased.
452 * This function erases an element, pointed to by the given iterator,
453 * from a %multimap. Note that this function only erases the element,
454 * and that if the element is itself a pointer, the pointed-to memory is
455 * not touched in any way. Managing the pointer is the user's
456 * responsibility.
458 void
459 erase(iterator __position)
460 { _M_t.erase(__position); }
463 * @brief Erases elements according to the provided key.
464 * @param x Key of element to be erased.
465 * @return The number of elements erased.
467 * This function erases all elements located by the given key from a
468 * %multimap.
469 * Note that this function only erases the element, and that if
470 * the element is itself a pointer, the pointed-to memory is not touched
471 * in any way. Managing the pointer is the user's responsibility.
473 size_type
474 erase(const key_type& __x)
475 { return _M_t.erase(__x); }
478 * @brief Erases a [first,last) range of elements from a %multimap.
479 * @param first Iterator pointing to the start of the range to be
480 * erased.
481 * @param last Iterator pointing to the end of the range to be erased.
483 * This function erases a sequence of elements from a %multimap.
484 * Note that this function only erases the elements, and that if
485 * the elements themselves are pointers, the pointed-to memory is not
486 * touched in any way. Managing the pointer is the user's responsibility.
488 void
489 erase(iterator __first, iterator __last)
490 { _M_t.erase(__first, __last); }
493 * @brief Swaps data with another %multimap.
494 * @param x A %multimap of the same element and allocator types.
496 * This exchanges the elements between two multimaps in constant time.
497 * (It is only swapping a pointer, an integer, and an instance of
498 * the @c Compare type (which itself is often stateless and empty), so it
499 * should be quite fast.)
500 * Note that the global std::swap() function is specialized such that
501 * std::swap(m1,m2) will feed to this function.
503 void
504 #ifdef __GXX_EXPERIMENTAL_CXX0X__
505 swap(multimap&& __x)
506 #else
507 swap(multimap& __x)
508 #endif
509 { _M_t.swap(__x._M_t); }
512 * Erases all elements in a %multimap. Note that this function only
513 * erases the elements, and that if the elements themselves are pointers,
514 * the pointed-to memory is not touched in any way. Managing the pointer
515 * is the user's responsibility.
517 void
518 clear()
519 { _M_t.clear(); }
521 // observers
523 * Returns the key comparison object out of which the %multimap
524 * was constructed.
526 key_compare
527 key_comp() const
528 { return _M_t.key_comp(); }
531 * Returns a value comparison object, built from the key comparison
532 * object out of which the %multimap was constructed.
534 value_compare
535 value_comp() const
536 { return value_compare(_M_t.key_comp()); }
538 // multimap operations
540 * @brief Tries to locate an element in a %multimap.
541 * @param x Key of (key, value) pair to be located.
542 * @return Iterator pointing to sought-after element,
543 * or end() if not found.
545 * This function takes a key and tries to locate the element with which
546 * the key matches. If successful the function returns an iterator
547 * pointing to the sought after %pair. If unsuccessful it returns the
548 * past-the-end ( @c end() ) iterator.
550 iterator
551 find(const key_type& __x)
552 { return _M_t.find(__x); }
555 * @brief Tries to locate an element in a %multimap.
556 * @param x Key of (key, value) pair to be located.
557 * @return Read-only (constant) iterator pointing to sought-after
558 * element, or end() if not found.
560 * This function takes a key and tries to locate the element with which
561 * the key matches. If successful the function returns a constant
562 * iterator pointing to the sought after %pair. If unsuccessful it
563 * returns the past-the-end ( @c end() ) iterator.
565 const_iterator
566 find(const key_type& __x) const
567 { return _M_t.find(__x); }
570 * @brief Finds the number of elements with given key.
571 * @param x Key of (key, value) pairs to be located.
572 * @return Number of elements with specified key.
574 size_type
575 count(const key_type& __x) const
576 { return _M_t.count(__x); }
579 * @brief Finds the beginning of a subsequence matching given key.
580 * @param x Key of (key, value) pair to be located.
581 * @return Iterator pointing to first element equal to or greater
582 * than key, or end().
584 * This function returns the first element of a subsequence of elements
585 * that matches the given key. If unsuccessful it returns an iterator
586 * pointing to the first element that has a greater value than given key
587 * or end() if no such element exists.
589 iterator
590 lower_bound(const key_type& __x)
591 { return _M_t.lower_bound(__x); }
594 * @brief Finds the beginning of a subsequence matching given key.
595 * @param x Key of (key, value) pair to be located.
596 * @return Read-only (constant) iterator pointing to first element
597 * equal to or greater than key, or end().
599 * This function returns the first element of a subsequence of elements
600 * that matches the given key. If unsuccessful the iterator will point
601 * to the next greatest element or, if no such greater element exists, to
602 * end().
604 const_iterator
605 lower_bound(const key_type& __x) const
606 { return _M_t.lower_bound(__x); }
609 * @brief Finds the end of a subsequence matching given key.
610 * @param x Key of (key, value) pair to be located.
611 * @return Iterator pointing to the first element
612 * greater than key, or end().
614 iterator
615 upper_bound(const key_type& __x)
616 { return _M_t.upper_bound(__x); }
619 * @brief Finds the end of a subsequence matching given key.
620 * @param x Key of (key, value) pair to be located.
621 * @return Read-only (constant) iterator pointing to first iterator
622 * greater than key, or end().
624 const_iterator
625 upper_bound(const key_type& __x) const
626 { return _M_t.upper_bound(__x); }
629 * @brief Finds a subsequence matching given key.
630 * @param x Key of (key, value) pairs to be located.
631 * @return Pair of iterators that possibly points to the subsequence
632 * matching given key.
634 * This function is equivalent to
635 * @code
636 * std::make_pair(c.lower_bound(val),
637 * c.upper_bound(val))
638 * @endcode
639 * (but is faster than making the calls separately).
641 std::pair<iterator, iterator>
642 equal_range(const key_type& __x)
643 { return _M_t.equal_range(__x); }
646 * @brief Finds a subsequence matching given key.
647 * @param x Key of (key, value) pairs to be located.
648 * @return Pair of read-only (constant) iterators that possibly points
649 * to the subsequence matching given key.
651 * This function is equivalent to
652 * @code
653 * std::make_pair(c.lower_bound(val),
654 * c.upper_bound(val))
655 * @endcode
656 * (but is faster than making the calls separately).
658 std::pair<const_iterator, const_iterator>
659 equal_range(const key_type& __x) const
660 { return _M_t.equal_range(__x); }
662 template<typename _K1, typename _T1, typename _C1, typename _A1>
663 friend bool
664 operator==(const multimap<_K1, _T1, _C1, _A1>&,
665 const multimap<_K1, _T1, _C1, _A1>&);
667 template<typename _K1, typename _T1, typename _C1, typename _A1>
668 friend bool
669 operator<(const multimap<_K1, _T1, _C1, _A1>&,
670 const multimap<_K1, _T1, _C1, _A1>&);
674 * @brief Multimap equality comparison.
675 * @param x A %multimap.
676 * @param y A %multimap of the same type as @a x.
677 * @return True iff the size and elements of the maps are equal.
679 * This is an equivalence relation. It is linear in the size of the
680 * multimaps. Multimaps are considered equivalent if their sizes are equal,
681 * and if corresponding elements compare equal.
683 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
684 inline bool
685 operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
686 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
687 { return __x._M_t == __y._M_t; }
690 * @brief Multimap ordering relation.
691 * @param x A %multimap.
692 * @param y A %multimap of the same type as @a x.
693 * @return True iff @a x is lexicographically less than @a y.
695 * This is a total ordering relation. It is linear in the size of the
696 * multimaps. The elements must be comparable with @c <.
698 * See std::lexicographical_compare() for how the determination is made.
700 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
701 inline bool
702 operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
703 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
704 { return __x._M_t < __y._M_t; }
706 /// Based on operator==
707 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
708 inline bool
709 operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
710 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
711 { return !(__x == __y); }
713 /// Based on operator<
714 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
715 inline bool
716 operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
717 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
718 { return __y < __x; }
720 /// Based on operator<
721 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
722 inline bool
723 operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
724 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
725 { return !(__y < __x); }
727 /// Based on operator<
728 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
729 inline bool
730 operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
731 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
732 { return !(__x < __y); }
734 /// See std::multimap::swap().
735 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
736 inline void
737 swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
738 multimap<_Key, _Tp, _Compare, _Alloc>& __y)
739 { __x.swap(__y); }
741 #ifdef __GXX_EXPERIMENTAL_CXX0X__
742 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
743 inline void
744 swap(multimap<_Key, _Tp, _Compare, _Alloc>&& __x,
745 multimap<_Key, _Tp, _Compare, _Alloc>& __y)
746 { __x.swap(__y); }
748 template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
749 inline void
750 swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
751 multimap<_Key, _Tp, _Compare, _Alloc>&& __y)
752 { __x.swap(__y); }
753 #endif
755 _GLIBCXX_END_NESTED_NAMESPACE
757 #endif /* _STL_MULTIMAP_H */