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( ) {
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(