Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/awelzel/vector-unsafe-iter…
Browse files Browse the repository at this point in the history
…ation'
  • Loading branch information
bbannier committed Dec 6, 2023
2 parents 817c2ed + 76e4d65 commit 0ccdf3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.10.0-dev.10 | 2023-12-06 10:40:22 +0100

* Allow unsafe Vector iteration over underlying std::vector. (Arne Welzel, Corelight)

1.10.0-dev.8 | 2023-11-17 14:04:16 +0100

* doc: Fix typo and outdated info for host applications (Anthony VEREZ)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.0-dev.8
1.10.0-dev.10
3 changes: 3 additions & 0 deletions hilti/runtime/include/types/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ class Vector : protected std::vector<T, Allocator> {
auto cbegin() const { return const_iterator(0U, _control); }
auto cend() const { return const_iterator(size(), _control); }

auto unsafeBegin() const { return V::cbegin(); }
auto unsafeEnd() const { return V::cend(); }

size_type size() const { return V::size(); }

// Methods of `std::vector`.
Expand Down

0 comments on commit 0ccdf3f

Please sign in to comment.