Remove obsolete TypeTuple references

Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
This commit is contained in:
Dragos Carp 2015-10-13 20:30:32 +02:00
parent 8d9d606ef8
commit d698887729
48 changed files with 643 additions and 645 deletions

View file

@ -491,9 +491,9 @@ if (isNarrowString!R1 && isNarrowString!R2)
import std.algorithm.iteration : filter;
import std.conv : to;
import std.exception : assertThrown;
import std.utf : UTFException;
import std.meta : AliasSeq;
import std.range;
import std.typetuple : TypeTuple;
import std.utf : UTFException;
assert(commonPrefix([1, 2, 3], [1, 2, 3, 4, 5]) == [1, 2, 3]);
assert(commonPrefix([1, 2, 3, 4, 5], [1, 2, 3]) == [1, 2, 3]);
@ -504,11 +504,11 @@ if (isNarrowString!R1 && isNarrowString!R2)
assert(commonPrefix(cast(int[])null, [1, 2, 3]).empty);
assert(commonPrefix(cast(int[])null, cast(int[])null).empty);
foreach (S; TypeTuple!(char[], const(char)[], string,
wchar[], const(wchar)[], wstring,
dchar[], const(dchar)[], dstring))
foreach (S; AliasSeq!(char[], const(char)[], string,
wchar[], const(wchar)[], wstring,
dchar[], const(dchar)[], dstring))
{
foreach(T; TypeTuple!(string, wstring, dstring))
foreach(T; AliasSeq!(string, wstring, dstring))
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
assert(commonPrefix(to!S(""), to!T("")).empty);
assert(commonPrefix(to!S(""), to!T("hello")).empty);
@ -1091,13 +1091,13 @@ if (isBidirectionalRange!R &&
@safe unittest
{
import std.algorithm.iteration : filterBidirectional;
import std.typetuple : TypeTuple;
import std.meta : AliasSeq;
import std.conv : to;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
foreach (S; TypeTuple!(char[], wchar[], dchar[], string, wstring, dstring))
foreach (S; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
{
assert(!endsWith(to!S("abc"), 'a'));
assert(endsWith(to!S("abc"), 'a', 'c') == 2);
@ -1105,7 +1105,7 @@ if (isBidirectionalRange!R &&
assert(endsWith(to!S("abc"), 'x', 'n', 'c') == 3);
assert(endsWith(to!S("abc\uFF28"), 'a', '\uFF28', 'c') == 2);
foreach (T; TypeTuple!(char[], wchar[], dchar[], string, wstring, dstring))
foreach (T; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
//Lots of strings
assert(endsWith(to!S("abc"), to!T("")));
@ -1139,7 +1139,7 @@ if (isBidirectionalRange!R &&
}();
}
foreach (T; TypeTuple!(int, short))
foreach (T; AliasSeq!(int, short))
{
immutable arr = cast(T[])[0, 1, 2, 3, 4, 5];
@ -1394,10 +1394,10 @@ if (isInputRange!InputRange &&
@safe pure unittest
{
import std.typetuple : TypeTuple;
foreach(R; TypeTuple!(string, wstring, dstring))
import std.meta : AliasSeq;
foreach(R; AliasSeq!(string, wstring, dstring))
{
foreach(E; TypeTuple!(char, wchar, dchar))
foreach(E; AliasSeq!(char, wchar, dchar))
{
R r1 = "hello world";
E e1 = 'w';
@ -1438,15 +1438,15 @@ if (isInputRange!InputRange &&
@safe unittest
{
import std.exception : assertCTFEable;
import std.typetuple : TypeTuple;
import std.meta : AliasSeq;
void dg() @safe pure nothrow
{
byte[] sarr = [1, 2, 3, 4];
ubyte[] uarr = [1, 2, 3, 4];
foreach(arr; TypeTuple!(sarr, uarr))
foreach(arr; AliasSeq!(sarr, uarr))
{
foreach(T; TypeTuple!(byte, ubyte, int, uint))
foreach(T; AliasSeq!(byte, ubyte, int, uint))
{
assert(find(arr, cast(T) 3) == arr[2 .. $]);
assert(find(arr, cast(T) 9) == arr[$ .. $]);
@ -1989,7 +1989,7 @@ if (Ranges.length > 1 && is(typeof(startsWith!pred(haystack, needles))))
@safe unittest
{
import std.algorithm.internal : rndstuff;
import std.typetuple : TypeTuple;
import std.meta : AliasSeq;
import std.uni : toUpper;
debug(std_algorithm) scope(success)
@ -1999,7 +1999,7 @@ if (Ranges.length > 1 && is(typeof(startsWith!pred(haystack, needles))))
assert(find(a, 5).empty);
assert(find(a, 2) == [2, 3]);
foreach (T; TypeTuple!(int, double))
foreach (T; AliasSeq!(int, double))
{
auto b = rndstuff!(T)();
if (!b.length) continue;
@ -2021,8 +2021,8 @@ if (Ranges.length > 1 && is(typeof(startsWith!pred(haystack, needles))))
{
import std.algorithm.internal : rndstuff;
import std.algorithm.comparison : equal;
import std.meta : AliasSeq;
import std.range : retro;
import std.typetuple : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
@ -2031,7 +2031,7 @@ if (Ranges.length > 1 && is(typeof(startsWith!pred(haystack, needles))))
assert(find(retro(a), 5).empty);
assert(equal(find(retro(a), 2), [ 2, 3, 2, 1 ][]));
foreach (T; TypeTuple!(int, double))
foreach (T; AliasSeq!(int, double))
{
auto b = rndstuff!(T)();
if (!b.length) continue;
@ -2120,7 +2120,7 @@ $(LREF among) for checking a value against multiple possibilities.
+/
template canFind(alias pred="a == b")
{
import std.typetuple : allSatisfy;
import std.meta : allSatisfy;
/++
Returns $(D true) if and only if any value $(D v) found in the
@ -2736,7 +2736,7 @@ unittest
unittest
{
import std.conv : text;
import std.typetuple : TypeTuple;
import std.meta : AliasSeq;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
@ -2786,7 +2786,7 @@ unittest
}
static assert(!isAssignable!S3);
foreach (Type; TypeTuple!(S1, IS1, S2, IS2, S3))
foreach (Type; AliasSeq!(S1, IS1, S2, IS2, S3))
{
static if (is(Type == immutable)) alias V = immutable int;
else alias V = int;
@ -3225,13 +3225,13 @@ if (isInputRange!R &&
{
import std.algorithm.iteration : filter;
import std.conv : to;
import std.meta : AliasSeq;
import std.range;
import std.typetuple : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
foreach (S; TypeTuple!(char[], wchar[], dchar[], string, wstring, dstring))
foreach (S; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
{
assert(!startsWith(to!S("abc"), 'c'));
assert(startsWith(to!S("abc"), 'a', 'c') == 1);
@ -3239,7 +3239,7 @@ if (isInputRange!R &&
assert(startsWith(to!S("abc"), 'x', 'n', 'a') == 3);
assert(startsWith(to!S("\uFF28abc"), 'a', '\uFF28', 'c') == 2);
foreach (T; TypeTuple!(char[], wchar[], dchar[], string, wstring, dstring))
foreach (T; AliasSeq!(char[], wchar[], dchar[], string, wstring, dstring))
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
//Lots of strings
assert(startsWith(to!S("abc"), to!T("")));
@ -3281,7 +3281,7 @@ if (isInputRange!R &&
assert(startsWith("abc".takeExactly(3), "abcd".takeExactly(3)));
assert(startsWith("abc".takeExactly(3), "abcd".takeExactly(1)));
foreach (T; TypeTuple!(int, short))
foreach (T; AliasSeq!(int, short))
{
immutable arr = cast(T[])[0, 1, 2, 3, 4, 5];