Skip to content

Commit

Permalink
port updates from poly/polysat
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Dec 9, 2023
1 parent e580c38 commit 70d4f32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/util/dlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,16 @@ class dll_iterator {
}
};

template <typename T>
class dll_elements {
T const* m_list;
public:
dll_elements(T const* list) : m_list(list) {}
dll_iterator<T> begin() const { return dll_iterator<T>::mk_begin(m_list); }
dll_iterator<T> end() const { return dll_iterator<T>::mk_end(m_list); }
};


template < typename T
, typename U = std::enable_if_t<std::is_base_of_v<dll_base<T>, T>> // should only match if T actually inherits from dll_base<T>
>
Expand Down
2 changes: 2 additions & 0 deletions src/util/var_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class var_queue {
void reset() {
m_queue.reset();
}

bool contains(var v) const { return m_queue.contains(v); }

bool empty() const { return m_queue.empty(); }

Expand Down

0 comments on commit 70d4f32

Please sign in to comment.