Skip to content

Commit 70d4f32

Browse files
port updates from poly/polysat
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent e580c38 commit 70d4f32

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/util/dlist.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ class dll_iterator {
223223
}
224224
};
225225

226+
template <typename T>
227+
class dll_elements {
228+
T const* m_list;
229+
public:
230+
dll_elements(T const* list) : m_list(list) {}
231+
dll_iterator<T> begin() const { return dll_iterator<T>::mk_begin(m_list); }
232+
dll_iterator<T> end() const { return dll_iterator<T>::mk_end(m_list); }
233+
};
234+
235+
226236
template < typename T
227237
, 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>
228238
>

src/util/var_queue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class var_queue {
6868
void reset() {
6969
m_queue.reset();
7070
}
71+
72+
bool contains(var v) const { return m_queue.contains(v); }
7173

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

0 commit comments

Comments
 (0)