2015-04-30 16:43:19 +02:00
|
|
|
// <experimental/map> -*- C++ -*-
|
|
|
|
|
2018-01-03 11:03:58 +01:00
|
|
|
// Copyright (C) 2015-2018 Free Software Foundation, Inc.
|
2015-04-30 16:43:19 +02:00
|
|
|
//
|
|
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
|
|
// software; you can redistribute it and/or modify it under the
|
|
|
|
// terms of the GNU General Public License as published by the
|
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
|
|
|
// any later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
|
|
// 3.1, as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/** @file experimental/map
|
|
|
|
* This is a TS C++ Library header.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GLIBCXX_EXPERIMENTAL_MAP
|
|
|
|
#define _GLIBCXX_EXPERIMENTAL_MAP 1
|
|
|
|
|
|
|
|
#pragma GCC system_header
|
|
|
|
|
2017-09-12 16:03:06 +02:00
|
|
|
#if __cplusplus >= 201402L
|
2015-04-30 16:43:19 +02:00
|
|
|
|
|
|
|
#include <map>
|
2015-10-09 13:11:54 +02:00
|
|
|
#include <experimental/bits/erase_if.h>
|
2015-11-13 11:01:05 +01:00
|
|
|
#include <experimental/memory_resource>
|
2015-04-30 16:43:19 +02:00
|
|
|
|
|
|
|
namespace std _GLIBCXX_VISIBILITY(default)
|
|
|
|
{
|
2017-07-23 10:41:35 +02:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
|
2015-04-30 16:43:19 +02:00
|
|
|
namespace experimental
|
|
|
|
{
|
|
|
|
inline namespace fundamentals_v2
|
|
|
|
{
|
|
|
|
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc,
|
|
|
|
typename _Predicate>
|
2015-05-01 17:00:46 +02:00
|
|
|
inline void
|
2015-04-30 16:43:19 +02:00
|
|
|
erase_if(map<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred)
|
|
|
|
{ __detail::__erase_nodes_if(__cont, __pred); }
|
|
|
|
|
|
|
|
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc,
|
|
|
|
typename _Predicate>
|
2015-05-01 17:00:46 +02:00
|
|
|
inline void
|
2015-04-30 16:43:19 +02:00
|
|
|
erase_if(multimap<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred)
|
|
|
|
{ __detail::__erase_nodes_if(__cont, __pred); }
|
|
|
|
|
2017-07-23 10:41:35 +02:00
|
|
|
namespace pmr {
|
|
|
|
template<typename _Key, typename _Tp, typename _Compare = less<_Key>>
|
|
|
|
using map
|
2015-11-13 11:01:05 +01:00
|
|
|
= std::map<_Key, _Tp, _Compare,
|
|
|
|
polymorphic_allocator<pair<const _Key, _Tp>>>;
|
|
|
|
|
2017-07-23 10:41:35 +02:00
|
|
|
template<typename _Key, typename _Tp, typename _Compare = less<_Key>>
|
|
|
|
using multimap
|
2015-11-13 11:01:05 +01:00
|
|
|
= std::multimap<_Key, _Tp, _Compare,
|
|
|
|
polymorphic_allocator<pair<const _Key, _Tp>>>;
|
2017-07-23 10:41:35 +02:00
|
|
|
} // namespace pmr
|
2015-04-30 16:43:19 +02:00
|
|
|
} // namespace fundamentals_v2
|
|
|
|
} // namespace experimental
|
2017-07-23 10:41:35 +02:00
|
|
|
|
|
|
|
_GLIBCXX_END_NAMESPACE_VERSION
|
2015-04-30 16:43:19 +02:00
|
|
|
} // namespace std
|
|
|
|
|
|
|
|
#endif // C++14
|
|
|
|
|
|
|
|
#endif // _GLIBCXX_EXPERIMENTAL_MAP
|