Commit graph

214 commits

Author SHA1 Message Date
jmdavis
9162311564 Fixed std.exception.enforceEx so that it gives proper file and line numbers.
The version which took an exception type which could be constructed
with a message but no file and line number has been scheduled for
deprecation.
2011-08-25 23:34:19 -07:00
jmdavis
29cafe3d22 Made most of the overloads for enforce @safe.
The delegate version isn't @safe, but that would require conditional
attributes and/or multiple overloads where the delegate is @safe,
@trusted, or @system. I'm not quite sure what it would take, so I'm
leaving it alone for now.
2011-06-09 02:44:41 -07:00
denis-sh
0367aabe68 Fixed incorrect commit 416f01ec documentation fix (!! added, because !a == false equals to !!a == true (it is correct for reals and it is impossible to overload it apart for structs (impossible to overload it for classes anyhow)).
Fixed incorrect pointer arithmetic with dynamic arrays in pointsTo.
Added support for static arrays in pointsTo. If there is a reason not to support it, add static assert(0); instead of my code in such case because of unexpected behaviour.

P.S.
Lets avoid pointer arithmetic in phobos when possible! Maybe it's time to find all pointers and fix it?
2011-05-30 03:12:59 -07:00
jmdavis
2f0ba9afab Slight adjustment to note on enforce. 2011-03-21 21:48:47 -07:00
jmdavis
416f01ec75 Some documentation improvements for enforce per suggestions on the newsgroup. 2011-03-17 20:20:32 -07:00
jmdavis
13c0266fbb Updates to std.exception per suggestions on pull request #12 of D-Programming-Language / phobos. 2011-02-27 04:58:33 -08:00
jmdavis
169f4225bf Unit test helper functions which were recently voted into Phobos.
assertPred did not pass the vote, so it is not included. However, the
remaining functions passed and have been included.
2011-02-24 20:07:00 -08:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Shin Fujishiro
0339b6acde Made std.exception.pointsTo "@trusted pure nothrow".
Also made it tolerant of shared objects. It's @trusted to cast shared away because the function just compares the addresses of passed objects.
2010-11-18 21:26:03 +00:00
Masahiro Nakagawa
2a37d92088 Remove @safe from assumeUnique. @safe function doesn't allow casting of mutable object to immutable. 2010-11-14 03:52:15 +00:00
Masahiro Nakagawa
57d08c37e3 Added pure, nothrow and @safe to assumeUnique function 2010-11-14 01:46:34 +00:00
Shin Fujishiro
5adac0d493 Fixed unlisted bug: std.exception.pointsTo() calls postblit on subobjects. 2010-09-17 21:39:52 +00:00
Andrei Alexandrescu
3f2b8c12ea 64-bit compatibility work 2010-08-22 20:55:22 +00:00
Andrei Alexandrescu
2f98916995 Added to replace std.contracts 2010-07-04 22:06:28 +00:00