Skip to content

Commit

Permalink
make things compile for NRF
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Feb 14, 2024
1 parent 86b15dc commit d9d6938
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/lib/support/Pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <lib/support/Iterators.h>

#include <atomic>
#include <iterator>
#include <limits>
#include <new>
#include <stddef.h>
Expand Down Expand Up @@ -192,9 +191,13 @@ struct HeapObjectList : HeapObjectListNode
/// The iterator is valid only if the Pool is not changed (no objects are created
/// or released)/
template <class T>
class BitmapActiveObjectIterator : public std::iterator<std::forward_iterator_tag, T>
class BitmapActiveObjectIterator
{
public:
using value_type = T;
using pointer = T*;
using reference = T&;

explicit BitmapActiveObjectIterator(internal::StaticAllocatorBitmap * pool, size_t idx) : mPool(pool), mIndex(idx) {}
BitmapActiveObjectIterator() {}

Expand Down Expand Up @@ -393,9 +396,13 @@ class HeapObjectPool : public internal::Statistics, public HeapObjectPoolExitHan
/// iterator exists. This also means that while a pool iterator exists, releasing
/// of tracking memory objects may be deferred until the last active iterator is
/// released.
class ActiveObjectIterator : public std::iterator<std::forward_iterator_tag, T>
class ActiveObjectIterator
{
public:
using value_type = T;
using pointer = T*;
using reference = T&;

ActiveObjectIterator() {}
ActiveObjectIterator(const ActiveObjectIterator & other) : mCurrent(other.mCurrent), mEnd(other.mEnd)
{
Expand Down

0 comments on commit d9d6938

Please sign in to comment.