From 16f69c01d911087b27c48d67978ce7a3b1834514 Mon Sep 17 00:00:00 2001 From: nhatdongdang <144138246+nhatdongdang@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:05:33 +1000 Subject: [PATCH] Fix iterator bug on macos --- include/mcpp/util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/mcpp/util.h b/include/mcpp/util.h index 640eb716..4e00ccc4 100644 --- a/include/mcpp/util.h +++ b/include/mcpp/util.h @@ -1,6 +1,8 @@ #pragma once #include "block.h" +#include +#include #include #include @@ -101,6 +103,8 @@ struct Chunk { * access to the elements stored in the chunk. */ struct Iterator { + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; using value_type = BlockType; using pointer = BlockType*; using reference = BlockType&; @@ -256,6 +260,8 @@ struct HeightMap { * operations over the height data stored within a HeightMap. */ struct Iterator { + using iterator_category = std::forward_iterator_tag; + using difference_type = std::ptrdiff_t; using value_type = int; using pointer = int*; using reference = int&;