Re: Comparing template alias parameters

2010-12-13 Thread Simen kjaeraas
Simen kjaeraas simen.kja...@gmail.com wrote: Given an index structure like this: struct Index( alias arr ) if ( is( typeof( arr ) t : U[], U ) ) { private size_t idx; @property pure nothrow size_t get( ) const { return idx; } alias get this; invariant( ) {

Comparing template alias parameters

2010-12-10 Thread Simen kjaeraas
Given an index structure like this: struct Index( alias arr ) if ( is( typeof( arr ) t : U[], U ) ) { private size_t idx; @property pure nothrow size_t get( ) const { return idx; } alias get this; invariant( ) { assert( idx arr.length ); } this(