mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 07:30:33 +03:00
DIP25: make phobos work with it
This commit is contained in:
parent
8969ae9d51
commit
dc302d26a4
13 changed files with 91 additions and 91 deletions
|
@ -136,7 +136,7 @@ ifneq (,$(filter cc% gcc% clang% icc% egcc%, $(CC)))
|
|||
endif
|
||||
|
||||
# Set DFLAGS
|
||||
DFLAGS=-I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -m$(MODEL) $(PIC)
|
||||
DFLAGS=-I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) -w -dip25 -m$(MODEL) $(PIC)
|
||||
ifeq ($(BUILD),debug)
|
||||
DFLAGS += -g -debug
|
||||
else
|
||||
|
|
|
@ -17,25 +17,25 @@ $(TR $(TH Category) $(TH Submodule) $(TH Functions)
|
|||
$(TR $(TDNW Searching)
|
||||
$(TDNW $(SUBMODULE searching))
|
||||
$(TD
|
||||
$(SUBREF searching, all)
|
||||
$(SUBREF searching, any)
|
||||
$(SUBREF searching, all)
|
||||
$(SUBREF searching, any)
|
||||
$(SUBREF searching, balancedParens)
|
||||
$(SUBREF searching, boyerMooreFinder)
|
||||
$(SUBREF searching, canFind)
|
||||
$(SUBREF searching, boyerMooreFinder)
|
||||
$(SUBREF searching, canFind)
|
||||
$(SUBREF searching, commonPrefix)
|
||||
$(SUBREF searching, count)
|
||||
$(SUBREF searching, countUntil)
|
||||
$(SUBREF searching, endsWith)
|
||||
$(SUBREF searching, count)
|
||||
$(SUBREF searching, countUntil)
|
||||
$(SUBREF searching, endsWith)
|
||||
$(SUBREF searching, find)
|
||||
$(SUBREF searching, findAdjacent)
|
||||
$(SUBREF searching, findAmong)
|
||||
$(SUBREF searching, findAdjacent)
|
||||
$(SUBREF searching, findAmong)
|
||||
$(SUBREF searching, findSkip)
|
||||
$(SUBREF searching, findSplit)
|
||||
$(SUBREF searching, findSplitAfter)
|
||||
$(SUBREF searching, findSplit)
|
||||
$(SUBREF searching, findSplitAfter)
|
||||
$(SUBREF searching, findSplitBefore)
|
||||
$(SUBREF searching, minCount)
|
||||
$(SUBREF searching, minPos)
|
||||
$(SUBREF searching, skipOver)
|
||||
$(SUBREF searching, minCount)
|
||||
$(SUBREF searching, minPos)
|
||||
$(SUBREF searching, skipOver)
|
||||
$(SUBREF searching, startsWith)
|
||||
$(SUBREF searching, until)
|
||||
)
|
||||
|
@ -58,73 +58,73 @@ $(TR $(TDNW Comparison)
|
|||
)
|
||||
$(TR $(TDNW Iteration)
|
||||
$(TDNW $(SUBMODULE iteration))
|
||||
$(TD
|
||||
$(SUBREF iteration, aggregate)
|
||||
$(SUBREF iteration, cache)
|
||||
$(SUBREF iteration, cacheBidirectional)
|
||||
$(SUBREF iteration, each)
|
||||
$(SUBREF iteration, filter)
|
||||
$(SUBREF iteration, filterBidirectional)
|
||||
$(SUBREF iteration, group)
|
||||
$(SUBREF iteration, groupBy)
|
||||
$(SUBREF iteration, joiner)
|
||||
$(SUBREF iteration, map)
|
||||
$(SUBREF iteration, reduce)
|
||||
$(SUBREF iteration, splitter)
|
||||
$(SUBREF iteration, sum)
|
||||
$(TD
|
||||
$(SUBREF iteration, aggregate)
|
||||
$(SUBREF iteration, cache)
|
||||
$(SUBREF iteration, cacheBidirectional)
|
||||
$(SUBREF iteration, each)
|
||||
$(SUBREF iteration, filter)
|
||||
$(SUBREF iteration, filterBidirectional)
|
||||
$(SUBREF iteration, group)
|
||||
$(SUBREF iteration, groupBy)
|
||||
$(SUBREF iteration, joiner)
|
||||
$(SUBREF iteration, map)
|
||||
$(SUBREF iteration, reduce)
|
||||
$(SUBREF iteration, splitter)
|
||||
$(SUBREF iteration, sum)
|
||||
$(SUBREF iteration, uniq)
|
||||
)
|
||||
)
|
||||
$(TR $(TDNW Sorting)
|
||||
$(TDNW $(SUBMODULE sorting))
|
||||
$(TD
|
||||
$(SUBREF sorting, completeSort)
|
||||
$(SUBREF sorting, isPartitioned)
|
||||
$(SUBREF sorting, isSorted)
|
||||
$(SUBREF sorting, makeIndex)
|
||||
$(SUBREF sorting, multiSort)
|
||||
$(SUBREF sorting, nextEvenPermutation)
|
||||
$(SUBREF sorting, nextPermutation)
|
||||
$(SUBREF sorting, partialSort)
|
||||
$(SUBREF sorting, partition)
|
||||
$(SUBREF sorting, partition3)
|
||||
$(SUBREF sorting, schwartzSort)
|
||||
$(SUBREF sorting, sort)
|
||||
$(SUBREF sorting, topN)
|
||||
$(TD
|
||||
$(SUBREF sorting, completeSort)
|
||||
$(SUBREF sorting, isPartitioned)
|
||||
$(SUBREF sorting, isSorted)
|
||||
$(SUBREF sorting, makeIndex)
|
||||
$(SUBREF sorting, multiSort)
|
||||
$(SUBREF sorting, nextEvenPermutation)
|
||||
$(SUBREF sorting, nextPermutation)
|
||||
$(SUBREF sorting, partialSort)
|
||||
$(SUBREF sorting, partition)
|
||||
$(SUBREF sorting, partition3)
|
||||
$(SUBREF sorting, schwartzSort)
|
||||
$(SUBREF sorting, sort)
|
||||
$(SUBREF sorting, topN)
|
||||
$(SUBREF sorting, topNCopy)
|
||||
$(SUBREF sorting, topNIndex)
|
||||
)
|
||||
)
|
||||
$(TR $(TDNW Set operations)
|
||||
$(TDNW $(SUBMODULE setops))
|
||||
$(TD
|
||||
$(SUBREF setops, cartesianProduct)
|
||||
$(SUBREF setops, largestPartialIntersection)
|
||||
$(SUBREF setops, largestPartialIntersectionWeighted)
|
||||
$(SUBREF setops, nWayUnion)
|
||||
$(SUBREF setops, setDifference)
|
||||
$(SUBREF setops, setIntersection)
|
||||
$(SUBREF setops, setSymmetricDifference)
|
||||
$(TD
|
||||
$(SUBREF setops, cartesianProduct)
|
||||
$(SUBREF setops, largestPartialIntersection)
|
||||
$(SUBREF setops, largestPartialIntersectionWeighted)
|
||||
$(SUBREF setops, nWayUnion)
|
||||
$(SUBREF setops, setDifference)
|
||||
$(SUBREF setops, setIntersection)
|
||||
$(SUBREF setops, setSymmetricDifference)
|
||||
$(SUBREF setops, setUnion)
|
||||
)
|
||||
)
|
||||
$(TR $(TDNW Mutation)
|
||||
$(TDNW $(SUBMODULE mutation))
|
||||
$(TD
|
||||
$(SUBREF mutation, bringToFront)
|
||||
$(SUBREF mutation, copy)
|
||||
$(SUBREF mutation, fill)
|
||||
$(SUBREF mutation, initializeAll)
|
||||
$(SUBREF mutation, move)
|
||||
$(SUBREF mutation, moveAll)
|
||||
$(SUBREF mutation, moveSome)
|
||||
$(SUBREF mutation, remove)
|
||||
$(SUBREF mutation, reverse)
|
||||
$(SUBREF mutation, strip)
|
||||
$(SUBREF mutation, stripLeft)
|
||||
$(SUBREF mutation, stripRight)
|
||||
$(SUBREF mutation, swap)
|
||||
$(SUBREF mutation, swapRanges)
|
||||
$(TD
|
||||
$(SUBREF mutation, bringToFront)
|
||||
$(SUBREF mutation, copy)
|
||||
$(SUBREF mutation, fill)
|
||||
$(SUBREF mutation, initializeAll)
|
||||
$(SUBREF mutation, move)
|
||||
$(SUBREF mutation, moveAll)
|
||||
$(SUBREF mutation, moveSome)
|
||||
$(SUBREF mutation, remove)
|
||||
$(SUBREF mutation, reverse)
|
||||
$(SUBREF mutation, strip)
|
||||
$(SUBREF mutation, stripLeft)
|
||||
$(SUBREF mutation, stripRight)
|
||||
$(SUBREF mutation, swap)
|
||||
$(SUBREF mutation, swapRanges)
|
||||
$(SUBREF mutation, uninitializedFill)
|
||||
)
|
||||
)
|
||||
|
@ -293,7 +293,7 @@ template forward(args...)
|
|||
|
||||
@safe unittest
|
||||
{
|
||||
ref int foo(ref int a) { return a; }
|
||||
ref int foo(return ref int a) { return a; }
|
||||
ref int bar(Args)(auto ref Args args)
|
||||
{
|
||||
return foo(forward!args);
|
||||
|
|
|
@ -4610,7 +4610,7 @@ version(unittest)
|
|||
{
|
||||
int j;
|
||||
__std_conv_S s;
|
||||
ref __std_conv_S foo() @property {s.i = j; return s;}
|
||||
ref __std_conv_S foo() return @property {s.i = j; return s;}
|
||||
alias foo this;
|
||||
}
|
||||
static assert(is(__std_conv_SS : __std_conv_S));
|
||||
|
|
|
@ -745,7 +745,7 @@ public:
|
|||
Params:
|
||||
rhs = The $(LREF SysTime) to assign to this one.
|
||||
+/
|
||||
ref SysTime opAssign(const ref SysTime rhs) @safe pure nothrow
|
||||
ref SysTime opAssign(const ref SysTime rhs) return @safe pure nothrow
|
||||
{
|
||||
_stdTime = rhs._stdTime;
|
||||
_timezone = rhs._timezone;
|
||||
|
@ -757,7 +757,7 @@ public:
|
|||
Params:
|
||||
rhs = The $(LREF SysTime) to assign to this one.
|
||||
+/
|
||||
ref SysTime opAssign(SysTime rhs) @safe pure nothrow
|
||||
ref SysTime opAssign(SysTime rhs) return @safe pure nothrow
|
||||
{
|
||||
_stdTime = rhs._stdTime;
|
||||
_timezone = rhs._timezone;
|
||||
|
@ -8151,7 +8151,7 @@ public:
|
|||
+/
|
||||
static SysTime fromISOString(S)(in S isoString, immutable TimeZone tz = null) @safe
|
||||
if(isSomeString!S)
|
||||
{
|
||||
{
|
||||
import std.string : strip;
|
||||
import std.conv : to;
|
||||
import std.algorithm : startsWith, find;
|
||||
|
@ -12641,7 +12641,7 @@ public:
|
|||
import std.conv : to;
|
||||
import std.algorithm : all, startsWith;
|
||||
import std.format : format;
|
||||
|
||||
|
||||
auto dstr = to!dstring(strip(isoExtString));
|
||||
|
||||
enforce(dstr.length >= 10, new DateTimeException(format("Invalid ISO Extended String: %s", isoExtString)));
|
||||
|
@ -12948,7 +12948,7 @@ private:
|
|||
Params:
|
||||
days = The number of days to add to this Date.
|
||||
+/
|
||||
ref Date _addDays(long days) @safe pure nothrow
|
||||
ref Date _addDays(long days) return @safe pure nothrow
|
||||
{
|
||||
dayOfGregorianCal = cast(int)(dayOfGregorianCal + days);
|
||||
return this;
|
||||
|
@ -14223,7 +14223,7 @@ private:
|
|||
Params:
|
||||
seconds = The number of seconds to add to this TimeOfDay.
|
||||
+/
|
||||
ref TimeOfDay _addSeconds(long seconds) @safe pure nothrow
|
||||
ref TimeOfDay _addSeconds(long seconds) return @safe pure nothrow
|
||||
{
|
||||
long hnsecs = convert!("seconds", "hnsecs")(seconds);
|
||||
hnsecs += convert!("hours", "hnsecs")(_hour);
|
||||
|
@ -17145,7 +17145,7 @@ private:
|
|||
Params:
|
||||
seconds = The number of seconds to add to this $(LREF DateTime).
|
||||
+/
|
||||
ref DateTime _addSeconds(long seconds) @safe pure nothrow
|
||||
ref DateTime _addSeconds(long seconds) return @safe pure nothrow
|
||||
{
|
||||
long hnsecs = convert!("seconds", "hnsecs")(seconds);
|
||||
hnsecs += convert!("hours", "hnsecs")(_tod._hour);
|
||||
|
@ -31070,7 +31070,7 @@ unittest
|
|||
import std.string;
|
||||
import std.typecons;
|
||||
import std.typetuple;
|
||||
|
||||
|
||||
static struct Rand3Letters
|
||||
{
|
||||
enum empty = false;
|
||||
|
|
|
@ -551,7 +551,7 @@ ulong getSize(in char[] name) @safe
|
|||
{
|
||||
return stat(path.tempCString(), buf);
|
||||
}
|
||||
static stat_t* ptrOfLocalVariable(ref stat_t buf) @trusted
|
||||
static stat_t* ptrOfLocalVariable(return ref stat_t buf) @trusted
|
||||
{
|
||||
return &buf;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ struct FullCaseEntry
|
|||
ubyte n, size;// n number in batch, size - size of batch
|
||||
ubyte entry_len;
|
||||
|
||||
@property auto value() const @trusted pure nothrow @nogc
|
||||
@property auto value() const @trusted pure nothrow @nogc return
|
||||
{
|
||||
return seq[0..entry_len];
|
||||
}
|
||||
|
|
|
@ -555,7 +555,7 @@ unittest
|
|||
char c;
|
||||
enum empty = false;
|
||||
void popFront(){};
|
||||
ref char front() @property
|
||||
ref char front() return @property
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
@ -1856,8 +1856,8 @@ ElementType!R moveBack(R)(R r)
|
|||
int payload = 5;
|
||||
@property bool empty() { return false; }
|
||||
@property TestRange save() { return this; }
|
||||
@property ref int front() { return payload; }
|
||||
@property ref int back() { return payload; }
|
||||
@property ref int front() return { return payload; }
|
||||
@property ref int back() return { return payload; }
|
||||
void popFront() { }
|
||||
void popBack() { }
|
||||
}
|
||||
|
|
|
@ -2702,7 +2702,7 @@ struct LockingTextReader
|
|||
|
||||
/* Read a utf8 sequence from the file, removing the chars from the stream.
|
||||
Returns an empty result when at EOF. */
|
||||
private char[] takeFront(ref char[4] buf)
|
||||
private char[] takeFront(return ref char[4] buf)
|
||||
{
|
||||
import std.utf : stride, UTFException;
|
||||
{
|
||||
|
@ -3807,7 +3807,7 @@ __gshared
|
|||
{
|
||||
// Read stdin, sort lines, write to stdout
|
||||
import std.stdio, std.array, std.algorithm : sort, copy;
|
||||
|
||||
|
||||
void main() {
|
||||
stdin // read from stdin
|
||||
.byLineCopy(KeepTerminator.yes) // copying each line
|
||||
|
|
|
@ -1291,7 +1291,7 @@ unittest
|
|||
int sharedF() shared { return 0; }
|
||||
|
||||
int x;
|
||||
ref int refF() { return x; }
|
||||
ref int refF() return { return x; }
|
||||
int propertyF() @property { return 0; }
|
||||
int nothrowF() nothrow { return 0; }
|
||||
int nogcF() @nogc { return 0; }
|
||||
|
|
|
@ -870,7 +870,7 @@ unittest
|
|||
static struct R
|
||||
{
|
||||
Tuple!(int, int) _front;
|
||||
@property ref Tuple!(int, int) front() { return _front; }
|
||||
@property ref Tuple!(int, int) front() return { return _front; }
|
||||
@property bool empty() { return _front[0] >= 10; }
|
||||
void popFront() { ++_front[0]; }
|
||||
}
|
||||
|
|
|
@ -2099,7 +2099,7 @@ unittest // bugzilla 12923
|
|||
pure
|
||||
{
|
||||
|
||||
char[] toUTF8(out char[4] buf, dchar c) nothrow @nogc @safe
|
||||
char[] toUTF8(return out char[4] buf, dchar c) nothrow @nogc @safe
|
||||
in
|
||||
{
|
||||
assert(isValidDchar(c));
|
||||
|
@ -2207,7 +2207,7 @@ string toUTF8(in dchar[] s) @trusted
|
|||
|
||||
/* =================== Conversion to UTF16 ======================= */
|
||||
|
||||
wchar[] toUTF16(ref wchar[2] buf, dchar c) nothrow @nogc @safe
|
||||
wchar[] toUTF16(return ref wchar[2] buf, dchar c) nothrow @nogc @safe
|
||||
in
|
||||
{
|
||||
assert(isValidDchar(c));
|
||||
|
|
|
@ -38,13 +38,13 @@ CFLAGS=-mn -6 -r
|
|||
|
||||
## Flags for dmd D compiler
|
||||
|
||||
DFLAGS=-O -release -w
|
||||
DFLAGS=-O -release -w -dip25
|
||||
#DFLAGS=-unittest -g
|
||||
#DFLAGS=-unittest -cov -g
|
||||
|
||||
## Flags for compiling unittests
|
||||
|
||||
UDFLAGS=-O -w
|
||||
UDFLAGS=-O -w -dip25
|
||||
|
||||
## C compiler
|
||||
|
||||
|
|
|
@ -37,13 +37,13 @@ CFLAGS=/O2 /nologo /I"$(VCDIR)\INCLUDE" /I"$(SDKDIR)\Include"
|
|||
|
||||
## Flags for dmd D compiler
|
||||
|
||||
DFLAGS=-m$(MODEL) -O -release -w
|
||||
DFLAGS=-m$(MODEL) -O -release -w -dip25
|
||||
#DFLAGS=-m$(MODEL) -unittest -g
|
||||
#DFLAGS=-m$(MODEL) -unittest -cov -g
|
||||
|
||||
## Flags for compiling unittests
|
||||
|
||||
UDFLAGS=-g -m$(MODEL) -O -w
|
||||
UDFLAGS=-g -m$(MODEL) -O -w -dip25
|
||||
|
||||
## C compiler, linker, librarian
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue