Changeset 3c13c03 for src/Common
- Timestamp:
- Sep 17, 2016, 8:27:51 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8c49c0e
- Parents:
- 12bc63a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Common/utility.h ¶
r12bc63a r3c13c03 158 158 } 159 159 160 // replace element of list with all elements of another list 160 161 template< typename T > 161 162 void replace( std::list< T > &org, typename std::list< T >::iterator pos, std::list< T > &with ) { … … 168 169 169 170 return; 171 } 172 173 // replace range of a list with a single element 174 template< typename T > 175 void replace( std::list< T > &org, typename std::list< T >::iterator begin, typename std::list< T >::iterator end, const T & with ) { 176 org.insert( begin, with ); 177 org.erase( begin, end ); 170 178 } 171 179
Note: See TracChangeset
for help on using the changeset viewer.