Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3453

Show
Ignore:
Timestamp:
04/23/08 00:16:44 (8 months ago)
Author:
sean
Message:

Fix for #1062

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/core/Traits.d

    r3440 r3453  
    147147template isStaticArrayType( T ) 
    148148{ 
    149     const bool isStaticArrayType = is( typeof(T.length) ) && 
    150                                    !is( typeof(T) == typeof(T.init) ) && 
    151                                    is( T == typeof(T[0])[isStaticArrayTypeInst!(T).length] ); 
     149    static if( is( typeof(T.length) ) && !is( typeof(T) == typeof(T.init) ) ) 
     150    { 
     151        const bool isStaticArrayType = is( T == typeof(T[0])[isStaticArrayTypeInst!(T).length] ); 
     152    } 
     153    else 
     154    { 
     155        const bool isStaticArrayType = false; 
     156    } 
    152157} 
    153158