Changeset b8b6c44
- Timestamp:
- Sep 2, 2018, 10:20:13 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7b10ea9
- Parents:
- 029e330
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/ScopedSet.h
r029e330 rb8b6c44 38 38 typedef typename Scope::pointer pointer; 39 39 typedef typename Scope::const_pointer const_pointer; 40 40 41 41 class iterator : public std::iterator< std::bidirectional_iterator_tag, 42 42 value_type > { … … 72 72 return *this; 73 73 } 74 74 75 75 reference operator* () { return *it; } 76 76 pointer operator-> () { return it.operator->(); } … … 104 104 bool operator!= (const iterator &that) { return !( *this == that ); } 105 105 106 size_type get_level() const { return i; } 107 106 108 private: 107 109 scope_list const *scopes; … … 180 182 bool operator!= (const const_iterator &that) { return !( *this == that ); } 181 183 184 size_type get_level() const { return i; } 185 182 186 private: 183 187 scope_list const *scopes; … … 185 189 size_type i; 186 190 }; 187 191 188 192 /// Starts a new scope 189 193 void beginScope() { … … 222 226 return const_iterator( const_cast< ScopedSet< Value >* >(this)->find( key ) ); 223 227 } 224 228 225 229 /// Finds the given key in the outermost scope inside the given scope where it occurs 226 230 iterator findNext( const_iterator &it, const Value &key ) { … … 242 246 return std::make_pair( iterator(scopes, res.first, scopes.size()-1), res.second ); 243 247 } 244 248 245 249 }; 246 250 } // namespace GenPoly
Note: See TracChangeset
for help on using the changeset viewer.