Mercurial > projects > orange
diff orange/util/Traits.d @ 27:fc315d786f24 experimental
Added unit testing.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 19 Nov 2010 11:14:55 +0100 |
parents | 78e5fef4bbf2 |
children | 301476d40518 |
line wrap: on
line diff
--- a/orange/util/Traits.d Tue Oct 19 10:22:10 2010 +0200 +++ b/orange/util/Traits.d Fri Nov 19 11:14:55 2010 +0100 @@ -28,6 +28,8 @@ version = Phobos; } +import orange.core.string; + template isPrimitive (T) { const bool isPrimitive = is(T == bool) || @@ -91,7 +93,7 @@ template isString (T) { - const bool isString = is(T : char[]) || is(T : wchar[]) || is(T : dchar[]); + const bool isString = is(T : string) || is(T : wstring) || is(T : dstring); } template isAssociativeArray (T)