const Term_ Term;
unsigned idx;
typedef std::iterator<std::bidirectional_iterator_tag, BB_, ptrdiff_t> super;
-public:
typedef SuccIterator<Term_, BB_> _Self;
+
+ inline bool index_is_valid(int idx) {
+ return idx >= 0 && (unsigned) idx < Term->getNumSuccessors();
+ }
+
+public:
typedef typename super::pointer pointer;
// TODO: This can be random access iterator, only operator[] missing.
return *this;
}
- inline bool index_is_valid (int idx) {
- return idx >= 0 && (unsigned) idx < Term->getNumSuccessors();
- }
-
/// getSuccessorIndex - This is used to interface between code that wants to
/// operate on terminator instructions directly.
unsigned getSuccessorIndex() const { return idx; }