mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 03:27:03 +03:00
Replaced std.contracts with std.exception throughout
This commit is contained in:
parent
2f98916995
commit
432e3fdfc8
20 changed files with 347 additions and 348 deletions
|
@ -46,7 +46,7 @@ Authors: $(WEB erdani.com, Andrei Alexandrescu)
|
|||
module std.algorithm;
|
||||
|
||||
import std.c.string;
|
||||
import std.array, std.container, std.contracts, std.conv, std.date,
|
||||
import std.array, std.container, std.conv, std.date, std.exception,
|
||||
std.functional, std.math, std.metastrings, std.range, std.string,
|
||||
std.traits, std.typecons, std.typetuple;
|
||||
|
||||
|
@ -776,7 +776,7 @@ unittest
|
|||
|
||||
// swap
|
||||
/**
|
||||
Swaps $(D lhs) and $(D rhs). See also $(XREF contracts, pointsTo).
|
||||
Swaps $(D lhs) and $(D rhs). See also $(XREF exception, pointsTo).
|
||||
|
||||
Preconditions:
|
||||
|
||||
|
@ -1646,7 +1646,7 @@ log(haystack.length)) steps are needed to position $(D haystack) at
|
|||
the beginning of the search. Also, once positioned, the search will
|
||||
continue only as long as haystack and the needle start with equal
|
||||
elements. To inform $(D find) that you want to perform a binary
|
||||
search, wrap $(D haystack) with a call to $(XREF contracts,
|
||||
search, wrap $(D haystack) with a call to $(XREF exception,
|
||||
assumeSorted). Then $(D find) will assume that $(D pred) and $(D less)
|
||||
are in the right relation and also that $(D haystack) is already
|
||||
sorted by $(D less).
|
||||
|
|
|
@ -14,7 +14,7 @@ module std.array;
|
|||
|
||||
import std.c.stdio;
|
||||
import core.memory;
|
||||
import std.algorithm, std.contracts, std.conv, std.encoding, std.range,
|
||||
import std.algorithm, std.conv, std.encoding, std.exception, std.range,
|
||||
std.string, std.traits, std.typecons, std.utf;
|
||||
version(unittest) private import std.stdio;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ module std.boxer;
|
|||
private import std.format;
|
||||
private import std.string;
|
||||
private import std.utf;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
|
||||
/* These functions and types allow packing objects into generic containers
|
||||
* and recovering them later. This comes into play in a wide spectrum of
|
||||
|
|
|
@ -39,7 +39,7 @@ private
|
|||
//import core.sync.condition;
|
||||
//import core.sync.mutex;
|
||||
import std.algorithm;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
import std.range;
|
||||
import std.stdio;
|
||||
import std.range;
|
||||
|
|
|
@ -24,7 +24,7 @@ module std.date;
|
|||
|
||||
private import std.stdio;
|
||||
private import std.dateparse;
|
||||
import std.c.stdlib, std.contracts, std.conv;
|
||||
import std.c.stdlib, std.conv, std.exception;
|
||||
|
||||
/**
|
||||
* $(D d_time) is a signed arithmetic type giving the time elapsed
|
||||
|
|
|
@ -24,7 +24,7 @@ private import std.ctype;
|
|||
private import std.string;
|
||||
import std.conv;
|
||||
private import std.utf;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
|
||||
private import std.stdio;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ module std.file;
|
|||
import core.memory;
|
||||
import core.stdc.stdio, core.stdc.stdlib, core.stdc.string,
|
||||
core.stdc.errno, std.algorithm, std.array,
|
||||
std.contracts, std.conv, std.date, std.format, std.path, std.process,
|
||||
std.conv, std.date, std.exception, std.format, std.path, std.process,
|
||||
std.range, std.regexp, std.stdio, std.string, std.traits, std.typecons,
|
||||
std.typetuple, std.utf;
|
||||
version (Win32)
|
||||
|
|
|
@ -18,9 +18,9 @@ module std.format;
|
|||
//debug=format; // uncomment to turn on debugging printf's
|
||||
|
||||
import core.stdc.stdio, core.stdc.stdlib, core.stdc.string;
|
||||
import std.algorithm, std.array, std.bitmanip, std.contracts, std.conv,
|
||||
std.ctype, std.functional, std.range, std.stdarg, std.string, std.system,
|
||||
std.traits, std.typetuple, std.utf;
|
||||
import std.algorithm, std.array, std.bitmanip, std.conv,
|
||||
std.ctype, std.exception, std.functional, std.range, std.stdarg,
|
||||
std.string, std.system, std.traits, std.typetuple, std.utf;
|
||||
version(unittest) {
|
||||
import std.stdio, std.typecons;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ module std.functional;
|
|||
|
||||
import std.metastrings, std.stdio, std.traits, std.typecons, std.typetuple;
|
||||
// for making various functions visible in *naryFun
|
||||
import std.algorithm, std.contracts, std.conv, std.math, std.range, std.string;
|
||||
import std.algorithm, std.conv, std.exception, std.math, std.range, std.string;
|
||||
|
||||
/**
|
||||
Transforms a string representing an expression into a unary
|
||||
|
|
|
@ -30,8 +30,8 @@ Distributed under the Boost Software License, Version 1.0.
|
|||
*/
|
||||
module std.getopt;
|
||||
|
||||
private import std.string, std.conv, std.traits, std.contracts, std.bitmanip,
|
||||
std.algorithm, std.ctype;
|
||||
private import std.string, std.conv, std.traits, std.bitmanip,
|
||||
std.algorithm, std.ctype, std.exception;
|
||||
|
||||
//version (unittest)
|
||||
//{
|
||||
|
|
|
@ -87,7 +87,7 @@ module std.md5;
|
|||
//debug=md5; // uncomment to turn on debugging printf's
|
||||
|
||||
import std.string;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
import std.c.stdio : printf;
|
||||
|
||||
/***************************************
|
||||
|
|
|
@ -28,7 +28,7 @@ private import std.conv;
|
|||
private import std.string;
|
||||
private import std.c.process;
|
||||
private import core.stdc.errno;
|
||||
private import std.contracts;
|
||||
private import std.exception;
|
||||
version (Windows)
|
||||
{
|
||||
import std.array, std.format, std.random, std.file;
|
||||
|
|
|
@ -54,7 +54,7 @@ Distributed under the Boost Software License, Version 1.0.
|
|||
*/
|
||||
module std.random;
|
||||
|
||||
import std.algorithm, std.c.time, std.contracts, std.conv, std.date, std.math,
|
||||
import std.algorithm, std.c.time, std.conv, std.date, std.exception, std.math,
|
||||
std.numeric, std.process, std.range, std.stdio, std.traits, core.thread;
|
||||
|
||||
// Segments of the code in this file Copyright (c) 1997 by Rick Booth
|
||||
|
|
|
@ -16,7 +16,7 @@ Authors: $(WEB erdani.org, Andrei Alexandrescu)
|
|||
module std.range;
|
||||
|
||||
public import std.array;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
import std.traits;
|
||||
import std.typecons;
|
||||
import std.typetuple;
|
||||
|
|
|
@ -18,7 +18,7 @@ public import core.stdc.stdio;
|
|||
import std.stdiobase;
|
||||
import core.memory, core.stdc.errno, core.stdc.stddef, core.stdc.stdlib,
|
||||
core.stdc.string, core.stdc.wchar_;
|
||||
import std.algorithm, std.array, std.contracts, std.conv, std.file, std.format,
|
||||
import std.algorithm, std.array, std.conv, std.exception, std.file, std.format,
|
||||
std.range, std.string, std.traits, std.typecons,
|
||||
std.typetuple, std.utf;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module std.string;
|
|||
private import core.exception : onRangeError;
|
||||
import core.stdc.stdio, core.stdc.stdlib,
|
||||
core.stdc.string, std.algorithm, std.array,
|
||||
std.contracts, std.conv, std.ctype, std.encoding, std.format,
|
||||
std.conv, std.ctype, std.encoding, std.exception, std.format,
|
||||
std.metastrings, std.range, std.regex, std.stdarg, std.stdio, std.traits,
|
||||
std.typetuple, std.uni, std.utf;
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ Authors: $(WEB erdani.org, Andrei Alexandrescu),
|
|||
Shin Fujishiro
|
||||
*/
|
||||
module std.typecons;
|
||||
import core.stdc.stdlib, std.algorithm, std.array, std.contracts, std.conv,
|
||||
std.metastrings, std.traits, std.typetuple, core.memory;
|
||||
import core.stdc.stdlib, std.algorithm, std.array, std.conv,
|
||||
std.exception, std.metastrings, std.traits, std.typetuple, core.memory;
|
||||
version(unittest) import std.stdio;
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@ private import std.ctype;
|
|||
private import std.c.stdlib;
|
||||
private import std.utf;
|
||||
private import std.stdio;
|
||||
import std.contracts;
|
||||
import std.exception;
|
||||
|
||||
class URIerror : Error
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
module std.utf;
|
||||
|
||||
import std.contracts, std.conv, std.range, std.traits, std.typecons;
|
||||
import std.conv, std.exception, std.range, std.traits, std.typecons;
|
||||
|
||||
//debug=utf; // uncomment to turn on debugging printf's
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
* Copyright: Copyright Andrei Alexandrescu 2007 - 2009.
|
||||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
|
||||
* Authors: $(WEB erdani.org, Andrei Alexandrescu)
|
||||
* Credits: Brad Roberts came up with the name $(D_PARAM contracts).
|
||||
*
|
||||
* Copyright Andrei Alexandrescu 2007 - 2009.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
|
@ -68,7 +67,7 @@ module std.variant;
|
|||
import std.traits, std.c.string, std.typetuple, std.conv;
|
||||
version(unittest)
|
||||
{
|
||||
import std.contracts, std.stdio;
|
||||
import std.exception, std.stdio;
|
||||
}
|
||||
|
||||
private template maxSize(T...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue