Mercurial > projects > ddata
changeset 1:8e817772ed3d
imports specified
author | Saaa |
---|---|
date | Thu, 10 Sep 2009 01:50:06 +0200 |
parents | 277bc71a8eaa |
children | ee1232043257 |
files | ddata.d |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ddata.d Thu Sep 10 01:16:42 2009 +0200 +++ b/ddata.d Thu Sep 10 01:50:06 2009 +0200 @@ -1,9 +1,11 @@ module ddata.ddata; -import std.stdio; +//debug +//import std.stdio; import std.string; -import std2.conv; +import std2.conv : to; +import std2.traits : isNumeric; class DDataException : Exception { @@ -173,7 +175,7 @@ { indexAssign!(T[])( temp, toBool( string[ sLoc1..sLoc2] ), index); } - else static if( std2.traits.isNumeric!( BaseType!(T) ) ) + else static if( isNumeric!( BaseType!(T) ) ) { indexAssign!(T[])( temp, to!( BaseType!(T) )( string[ sLoc1..sLoc2] ), index); } @@ -211,7 +213,7 @@ { indexAssign!(T[])( temp, toBool( string[ sLoc1..sLoc2]), index); } - else static if( std2.traits.isNumeric!( BaseType!(T) ) ) + else static if( isNumeric!( BaseType!(T) ) ) { indexAssign!(T[])( temp, to!( BaseType!(T) )(string[ sLoc1..sLoc2]), index); } @@ -264,7 +266,8 @@ } } -void unittests() { +unittest +{ writefln("DData UnitTest..."); int[][][] ia = [ [[1,2],[3,4],[5]] , [[6],[],[7,8,9]] , [[]] ];