Skip to content

Commit

Permalink
add set method to iterator, Z3Prover#2068, a set method to the vector…
Browse files Browse the repository at this point in the history
… template was also added

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Jan 7, 2019
1 parent a87f7a1 commit ea48d0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/c++/z3++.h
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,9 @@ namespace z3 {
++m_index;
return *this;
}
void set(T& arg) {
Z3_ast_vector_set(m_vector->ctx(), *m_vector, m_index, arg);
}
iterator operator++(int) { iterator tmp = *this; ++m_index; return tmp; }
T * operator->() const { return &(operator*()); }
T operator*() const { return (*m_vector)[m_index]; }
Expand Down

0 comments on commit ea48d0a

Please sign in to comment.