// Bitmap Allocator. -*- C++ -*-
-// Copyright (C) 2004-2020 Free Software Foundation, Inc.
+// Copyright (C) 2004-2024 Free Software Foundation, Inc.
//
// 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
#ifndef _BITMAP_ALLOCATOR_H
#define _BITMAP_ALLOCATOR_H 1
+#include <bits/requires_hosted.h> // GNU extensions are currently omitted
+
#include <utility> // For std::pair.
#include <bits/functexcept.h> // For __throw_bad_alloc().
-#include <functional> // For greater_equal, and less_equal.
+#include <bits/stl_function.h> // For greater_equal, and less_equal.
#include <new> // For operator new.
#include <debug/debug.h> // _GLIBCXX_DEBUG_ASSERT
#include <ext/concurrence.h>
// _Tp should be a pointer type.
template<typename _Tp>
class _Inclusive_between
- : public std::unary_function<typename std::pair<_Tp, _Tp>, bool>
{
typedef _Tp pointer;
pointer _M_ptr_value;
// Used to pass a Functor to functions by reference.
template<typename _Functor>
class _Functor_Ref
- : public std::unary_function<typename _Functor::argument_type,
- typename _Functor::result_type>
{
_Functor& _M_fref;
// the vector.
template<typename _Tp>
class _Ffit_finder
- : public std::unary_function<typename std::pair<_Tp, _Tp>, bool>
{
- typedef typename std::pair<_Tp, _Tp> _Block_pair;
- typedef typename __detail::__mini_vector<_Block_pair> _BPVector;
+ typedef std::pair<_Tp, _Tp> _Block_pair;
+ typedef __detail::__mini_vector<_Block_pair> _BPVector;
typedef typename _BPVector::difference_type _Counter_type;
std::size_t* _M_pbitmap;
_Counter_type _M_data_offset;
public:
+ typedef bool result_type;
+ typedef _Block_pair argument_type;
+
_Ffit_finder() : _M_pbitmap(0), _M_data_offset(0)
{ }
const bitmap_allocator<_Tp2>&) throw()
{ return true; }
+#if __cpp_impl_three_way_comparison < 201907L
template<typename _Tp1, typename _Tp2>
bool
operator!=(const bitmap_allocator<_Tp1>&,
const bitmap_allocator<_Tp2>&) throw()
- { return false; }
+ { return false; }
+#endif
// Static member definitions.
template<typename _Tp>