Changeset 3440
- Timestamp:
- 04/17/08 01:43:25 (8 months ago)
- Files:
-
- trunk/tango/core/Traits.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/core/Traits.d
r3151 r3440 136 136 137 137 138 private template isStaticArrayTypeInst( T ) 139 { 140 const T isStaticArrayTypeInst = void; 141 } 142 143 138 144 /** 139 145 * Evaluates to true if T is a static array type. … … 141 147 template isStaticArrayType( T ) 142 148 { 143 const bool isStaticArrayType = is( typeof(T.init)[(T).sizeof / typeof(T.init).sizeof] == T ); 149 const bool isStaticArrayType = is( typeof(T.length) ) && 150 !is( typeof(T) == typeof(T.init) ) && 151 is( T == typeof(T[0])[isStaticArrayTypeInst!(T).length] ); 144 152 } 145 153












