Skip to content

Commit

Permalink
Remove std::iterator from base class of integer_set::const_iterator
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Mar 26, 2024
1 parent 0ea87fe commit e3da75e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Procedures for each standard are provided by the following R7RS-style libraries:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.5.159_amd64.deb
sudo apt install build/meevax_0.5.160_amd64.deb
```

or
Expand Down Expand Up @@ -123,9 +123,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.159.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.160.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.159_amd64.deb`
| `package` | Generate debian package `meevax_0.5.160_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.159
0.5.160
24 changes: 22 additions & 2 deletions include/meevax/memory/integer_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,18 @@ inline namespace memory

std::size_t max = 0;

struct const_iterator : public std::iterator<std::bidirectional_iterator_tag, T>
struct const_iterator
{
using value_type = T;

using difference_type = std::ptrdiff_t;

using pointer = T *;

using reference = T &;

using iterator_category = std::bidirectional_iterator_tag;

subset const* const* data = nullptr;

std::size_t max = 0;
Expand Down Expand Up @@ -273,8 +283,18 @@ inline namespace memory

std::uint64_t data[N / 64] {};

struct const_iterator : public std::iterator<std::bidirectional_iterator_tag, T>
struct const_iterator
{
using value_type = T;

using difference_type = std::ptrdiff_t;

using pointer = T *;

using reference = T &;

using iterator_category = std::bidirectional_iterator_tag;

std::uint64_t const* data = nullptr;

std::size_t index = std::numeric_limits<std::size_t>::max();
Expand Down

0 comments on commit e3da75e

Please sign in to comment.