k-hara
25a7917087
Remove parens of single template parameter
2011-08-23 13:20:45 +09:00
k-hara
7ce2c78da1
use assertThrown
2011-08-23 13:20:45 +09:00
k-hara
dcb2f9a6f7
If parsing like integer is succeeded and comparing is failed, it raises overflow error
2011-08-23 13:20:45 +09:00
k-hara
c0f589d557
Fix std.conv.parse!Char(String)
2011-08-23 13:20:43 +09:00
k-hara
2b15effad7
Fix const(bool) parsing.
2011-08-23 13:20:43 +09:00
k-hara
eb618ccd67
std.traits.isIntegral never match any char types.
2011-08-23 13:20:42 +09:00
k-hara
44d9ae3f67
Support parse!dchar(dstring) behave like chomp
2011-08-23 13:20:42 +09:00
k-hara
e669322153
Enable and add unittests for parser.
2011-08-23 13:20:42 +09:00
k-hara
816c58ee29
Fix octal and enable part of its unittest.
...
We have to limit the octal instantiation by its template constraint, not static assert in template body.
2011-08-23 13:20:41 +09:00
k-hara
78f47ee11b
Remove dead code.
2011-08-23 13:20:41 +09:00
k-hara
3790da2ffc
Fix indents.
2011-08-23 13:20:40 +09:00
k-hara
62293b0dd9
Public functions first: octal family.
2011-08-23 13:20:40 +09:00
k-hara
4e0aa77747
Public functions first: text family.
2011-08-23 13:20:40 +09:00
k-hara
e6a4c3ff8f
Move unittests for to!T and parse!T (T = floating point types).
2011-08-23 13:20:39 +09:00
k-hara
c666b94961
Move unittests for to!T and parse!T (T = bool).
2011-08-23 13:20:39 +09:00
k-hara
3f85a819f7
Move unittests for to!T and parse!T (T = integral types).
2011-08-23 13:20:38 +09:00
k-hara
78cd0cc1b2
Remove trailing spaces.
2011-08-23 13:20:38 +09:00
k-hara
8ff9edf63f
Remove duplicate unittests
2011-08-23 13:20:38 +09:00
dsimcha
322876c308
Merge branch 'master' of https://github.com/D-Programming-Language/phobos
2011-08-14 15:01:53 -04:00
dsimcha
994d76fe6f
Add messages to a few asserts to make the auto tester give some details about why they're failing on OS X. This is weird--nothing in these unit tests looks at all platform-specific.
2011-08-14 15:00:40 -04:00
Andrei Alexandrescu
537c59c79e
Merge pull request #178 from jmdavis/deprecation
...
Deprecated stuff which was scheduled to be deprecated in August 2011.
2011-08-14 11:04:21 -07:00
k-hara
117f4f6359
Issue 6377 - std.conv.to should check range when changing signedness
2011-08-13 12:17:23 +09:00
jmdavis
db5051a5af
Changed "Warning" to "Notice" in deprecation messages.
...
Hopefully, they don't get confused with compiler warnings this way.
2011-08-09 00:39:27 -07:00
Andrei Alexandrescu
10556b45c8
Merge pull request #149 from kennytm/bug5547_assertPred_workaround4737
...
Bug 5547: assertPred (workaround bug 4737)
2011-07-20 12:29:07 -07:00
KennyTM~
43a8ad9ab4
Workaround bug 4737, because a typeid is introduced implicitly by the new assert.
2011-07-18 22:44:34 +08:00
KennyTM~
df4e92d712
(Minor cleanup) Change some idiomic GC.malloc usage to uninitializedArray
...
Simplify the common pattern `(cast(T*)GC.malloc(T.sizeof * n, NO_SCAN))[0 .. n]` to the new function `uninitializedArray!(T[])(n)`.
Note that there was some `NO_SCAN` attributes originally determined at runtime using `typeid()`, but now is determined statically using `hasIndirection!()` from the implementation of `uninitializedArray`.
There were also some `GC.malloc` usage looks like `uninitializedArray` in `std.parallelism` but I'm leaving it alone for someone who is more familiar with this module ;).
2011-07-14 04:29:34 +08:00
k-hara
bc8c6190bd
Add author.
2011-07-07 08:28:28 +09:00
k-hara
a58e1cbf84
Collect documentation by 'conversion kind'.
2011-07-07 08:22:11 +09:00
k-hara
d28a4454bc
Merge some functions.
2011-07-07 08:22:11 +09:00
k-hara
722b02884b
Reorder functions and unittests.
2011-07-07 08:22:11 +09:00
k-hara
593bc71f53
3. Support conversion feature using constructor like new T(s) with class types.
2011-07-07 08:21:35 +09:00
k-hara
3bb892cbef
Revert 'removing feature using to' and add deprecation message.
2011-07-07 08:19:01 +09:00
k-hara
4d069ae1fe
Remove incorrect documentation.
2011-07-07 08:19:01 +09:00
k-hara
7dfc4ff1a4
Improve std.conv.to
...
1. Remove conversion feature using member template function to!T() of user type.
2-1. Support conversion feature using opCast!T() with aggregate types.
2-2. Support conversion feature using constructor like T(s) with struct types.
2011-07-07 08:19:00 +09:00
k-hara
9c04bee411
Replace std.conv.implicitlyConverts to std.traits.isImplicitlyConvertible
...
The two templates has same purpose, but bit different behaviors.
implicitlyConverts(S, T) has following semantics:
is(S : T) and allow initializer conversion (T t = s; -> T t = T(s);)
Including initializer conversion is inconvenience for my to!() improvement in after commits, so replace it.
2011-07-07 08:19:00 +09:00
k-hara
91bceb08f2
Remove parens with single template parameter.
2011-07-07 08:18:59 +09:00
k-hara
833ce93da2
Fix toImpl's template constraints order (relation with S and T -> constraint of S -> constraint of T) for code readability.
2011-07-07 08:18:59 +09:00
jmdavis
84f1329cbb
Renamed isUniAlpha to isAlpha.
...
isUniAlpha is now scheduled for deprecation.
2011-06-22 20:46:34 -07:00
jmdavis
0ca76972fe
Renamed toUniLower and toUniUpper to toLower and toUpper.
...
toUniLower and toUniUpper are now scheduled for deprecation.
2011-06-22 20:34:08 -07:00
jmdavis
e3f7c0c288
Renamed isUniWhite to isWhite.
2011-06-22 19:44:36 -07:00
jmdavis
15fb65f1bb
Reverted toAsciiLower and toAsciiUpper to toLower and toUpper.
2011-06-22 19:22:27 -07:00
jmdavis
2d310e5e20
Changed the names of some of the std.ascii functions.
...
isWhite, isLower, isUpper, toLower, and toUpper now have Ascii in their
name, which matches what std.unit does with its versions of those
functions. Hopefully, it should also reduce bugs due to using the wrong
function between the ASCII and unicode versions by making the difference
more obvious.
2011-06-19 18:41:00 -07:00
jmdavis
213c064e70
Reverted change from toStringz to toStringZ.
...
There was no consenus in the newsgroup about what to do about renaming
toStringz to be properly camelcased. It was pretty much divided between
renaming it to toCString and leaving it exactly as-is. No one wanted it
to be toStringZ. So, given the lack of consensus, I'm just going to
leave it as toStringz.
2011-06-18 01:13:21 -07:00
jmdavis
dd3a0c20a2
Created std.ascii to replace std.ctype.
...
All of the new, properly camelcased functions in std.ctype have been
moved to std.ascii, and std.ctype has been scheduled for deprecation.
2011-06-14 04:06:54 -07:00
jmdavis
7d5c1831e5
Replaced calls to toStringz with toStringZ.
2011-06-12 16:59:52 -07:00
jmdavis
447ce1db96
Replaced uses of std.string constants which are scheduled for deprecation.
...
I also replaced the std.string constants which have the same name as the
their std.ctype counterparts so that code doesn't break which imports
both std.string and std.ctype.
2011-06-12 16:59:52 -07:00
jmdavis
30069ea6f0
Replaced calls to std.string and std.ctype's toupper with their toUpper counterparts.
2011-06-12 16:59:52 -07:00
jmdavis
654f35a677
Replaced calls to std.string and std.ctype's tolower with their toLower counterparts.
2011-06-12 16:59:52 -07:00
jmdavis
11cdd6ce17
Replaced calls to std.ctype.isxdigit with isHexDigit.
2011-06-12 16:59:51 -07:00
jmdavis
19ae2b4998
Replace calls to std.ctype.isdigt with std.ctype.isDigit.
2011-06-12 16:59:51 -07:00