Changes in libcfa/src/bits/containers.hfa [fd54fef:8b73526]
- File:
-
- 1 edited
-
libcfa/src/bits/containers.hfa (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/containers.hfa
rfd54fef r8b73526 23 23 24 24 #ifdef __cforall 25 forall( T &)25 forall(dtype T) 26 26 #else 27 27 #define T void … … 40 40 41 41 #ifdef __cforall 42 // forall( T | sized(T))42 // forall(otype T | sized(T)) 43 43 // static inline void ?{}(__small_array(T) & this) {} 44 44 45 forall( T &| sized(T))45 forall(dtype T | sized(T)) 46 46 static inline T & ?[?]( __small_array(T) & this, __lock_size_t idx ) { 47 47 return ((typeof(this.data))this.data)[idx]; 48 48 } 49 49 50 forall( T &| sized(T))50 forall(dtype T | sized(T)) 51 51 static inline T & ?[?]( const __small_array(T) & this, __lock_size_t idx ) { 52 52 return ((typeof(this.data))this.data)[idx]; 53 53 } 54 54 55 forall( T &)55 forall(dtype T) 56 56 static inline T * begin( const __small_array(T) & this ) { 57 57 return ((typeof(this.data))this.data); 58 58 } 59 59 60 forall( T &| sized(T))60 forall(dtype T | sized(T)) 61 61 static inline T * end( const __small_array(T) & this ) { 62 62 return ((typeof(this.data))this.data) + this.size; … … 69 69 70 70 #ifdef __cforall 71 trait is_node( T &) {71 trait is_node(dtype T) { 72 72 T *& get_next( T & ); 73 73 }; … … 78 78 //----------------------------------------------------------------------------- 79 79 #ifdef __cforall 80 forall( TYPE &)80 forall(dtype TYPE) 81 81 #define T TYPE 82 82 #else … … 95 95 96 96 #ifdef __cforall 97 forall( T &)97 forall(dtype T) 98 98 static inline void ?{}( __stack(T) & this ) { 99 99 (this.top){ 0p }; 100 100 } 101 101 102 static inline forall( T &| is_node(T) ) {102 static inline forall( dtype T | is_node(T) ) { 103 103 void push( __stack(T) & this, T * val ) { 104 104 verify( !get_next( *val ) ); … … 126 126 //----------------------------------------------------------------------------- 127 127 #ifdef __cforall 128 forall( TYPE &)128 forall(dtype TYPE) 129 129 #define T TYPE 130 130 #else … … 144 144 145 145 #ifdef __cforall 146 static inline forall( T &| is_node(T) ) {146 static inline forall( dtype T | is_node(T) ) { 147 147 void ?{}( __queue(T) & this ) with( this ) { 148 148 (this.head){ 1p }; … … 215 215 //----------------------------------------------------------------------------- 216 216 #ifdef __cforall 217 forall( TYPE &)217 forall(dtype TYPE) 218 218 #define T TYPE 219 219 #define __getter_t * [T * & next, T * & prev] ( T & ) … … 237 237 238 238 #ifdef __cforall 239 forall( T &)239 forall(dtype T ) 240 240 static inline [void] ?{}( __dllist(T) & this, * [T * & next, T * & prev] ( T & ) __get ) { 241 241 (this.head){ 0p }; … … 245 245 #define next 0 246 246 #define prev 1 247 static inline forall( T &) {247 static inline forall(dtype T) { 248 248 void push_front( __dllist(T) & this, T & node ) with( this ) { 249 249 verify(__get);
Note:
See TracChangeset
for help on using the changeset viewer.