24
Containers library
[containers]
24.4
Associative containers
[associative]
24.4.2
Header
<map>
synopsis
[associative.map.syn]
🔗
#include
<
compare
>
// see
[compare.
syn]
#include
<
initializer_list
>
// see
[initializer.
list.
syn]
namespace
std
{
//
[map]
, class template
map
template
<
class
Key,
class
T,
class
Compare
=
less
<
Key
>
,
class
Allocator
=
allocator
<
pair
<
const
Key, T
>
>
>
class
map;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
bool
operator
=
=
(
const
map
<
Key, T, Compare, Allocator
>
&
x,
const
map
<
Key, T, Compare, Allocator
>
&
y
)
;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
synth-three-way-result
<
pair
<
const
Key, T
>
>
operator
<
=
>
(
const
map
<
Key, T, Compare, Allocator
>
&
x,
const
map
<
Key, T, Compare, Allocator
>
&
y
)
;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
void
swap
(
map
<
Key, T, Compare, Allocator
>
&
x, map
<
Key, T, Compare, Allocator
>
&
y
)
noexcept
(
noexcept
(
x
.
swap
(
y
)
)
)
;
//
[map.
erasure]
, erasure for
map
template
<
class
Key,
class
T,
class
Compare,
class
Allocator,
class
Predicate
>
typename
map
<
Key, T, Compare, Allocator
>
::
size_type erase_if
(
map
<
Key, T, Compare, Allocator
>
&
c, Predicate pred
)
;
//
[multimap]
, class template
multimap
template
<
class
Key,
class
T,
class
Compare
=
less
<
Key
>
,
class
Allocator
=
allocator
<
pair
<
const
Key, T
>
>
>
class
multimap;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
bool
operator
=
=
(
const
multimap
<
Key, T, Compare, Allocator
>
&
x,
const
multimap
<
Key, T, Compare, Allocator
>
&
y
)
;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
synth-three-way-result
<
pair
<
const
Key, T
>
>
operator
<
=
>
(
const
multimap
<
Key, T, Compare, Allocator
>
&
x,
const
multimap
<
Key, T, Compare, Allocator
>
&
y
)
;
template
<
class
Key,
class
T,
class
Compare,
class
Allocator
>
void
swap
(
multimap
<
Key, T, Compare, Allocator
>
&
x, multimap
<
Key, T, Compare, Allocator
>
&
y
)
noexcept
(
noexcept
(
x
.
swap
(
y
)
)
)
;
//
[multimap.
erasure]
, erasure for
multimap
template
<
class
Key,
class
T,
class
Compare,
class
Allocator,
class
Predicate
>
typename
multimap
<
Key, T, Compare, Allocator
>
::
size_type erase_if
(
multimap
<
Key, T, Compare, Allocator
>
&
c, Predicate pred
)
;
namespace
pmr
{
template
<
class
Key,
class
T,
class
Compare
=
less
<
Key
>
>
using
map
=
std
::
map
<
Key, T, Compare, polymorphic_allocator
<
pair
<
const
Key, T
>
>
>
;
template
<
class
Key,
class
T,
class
Compare
=
less
<
Key
>
>
using
multimap
=
std
::
multimap
<
Key, T, Compare, polymorphic_allocator
<
pair
<
const
Key, T
>
>
>
;
}
}