# HG changeset patch # User Saaa # Date 1252540206 -7200 # Node ID 8e817772ed3de6c59e56731beb3d7c96da1879e9 # Parent 277bc71a8eaa45d3bf69f106ffe7a7185e7eecce imports specified diff -r 277bc71a8eaa -r 8e817772ed3d ddata.d --- 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]] , [[]] ];