Changeset 1707
- Timestamp:
- 07/01/10 19:07:19 (14 years ago)
- Files:
-
- trunk/phobos/std/contracts.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/phobos/std/contracts.d
r1706 r1707 464 464 errno = getErrno; 465 465 version (linux) 466 466 { 467 467 char[1024] buf = void; 468 468 auto s = std.c.string.strerror_r(errno, buf.ptr, buf.length); 469 469 } 470 470 else 471 471 { 472 472 auto s = std.c.string.strerror(errno); 473 473 } 474 super((file ? file~'('~to!string(line)~"): " : "") 475 ~msg~" ("~to!string(s)~")"); 474 super(msg~" ("~to!string(s)~")", file, line); 476 475 } 477 476 } 478 477 479 478 // structuralCast 480 479 // class-to-class structural cast 481 480 Target structuralCast(Target, Source)(Source obj) 482 481 if (is(Source == class) || is(Target == class)) 483 482 { 484 483 // For the structural cast to work, the source and the target must 485 484 // have the same base class, and the target must add no data or
