import std.typetuple -> import std.meta

This commit is contained in:
Dicebot 2015-04-25 13:51:11 +03:00
parent d689291080
commit 73f773838d
43 changed files with 172 additions and 172 deletions

View file

@ -132,7 +132,7 @@ efficient search, but one that only supports matching on equality:
@safe unittest
{
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
if (auto pos = 3.among(1, 2, 3))
assert(pos == 3);

View file

@ -294,7 +294,7 @@ private struct _Cache(R, bool bidir)
private
{
import std.algorithm.internal : algoFormat;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
alias E = ElementType!R;
alias UE = Unqual!E;
@ -430,14 +430,14 @@ template map(fun...) if (fun.length >= 1)
{
auto map(Range)(Range r) if (isInputRange!(Unqual!Range))
{
import std.typetuple : staticMap;
import std.meta : staticMap;
alias AppliedReturnType(alias f) = typeof(f(r.front));
static if (fun.length > 1)
{
import std.functional : adjoin;
import std.typetuple : staticIndexOf;
import std.meta : staticIndexOf;
alias _funs = staticMap!(unaryFun, fun);
alias _fun = adjoin!_funs;
@ -817,7 +817,7 @@ See_Also: $(XREF range,tee)
*/
template each(alias pred = "a")
{
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
alias BinaryArgs = TypeTuple!(pred, "i", "a");
enum isRangeUnaryIterable(R) =
@ -2445,7 +2445,7 @@ See_Also:
+/
template reduce(fun...) if (fun.length >= 1)
{
import std.typetuple : staticMap;
import std.meta : staticMap;
alias binfuns = staticMap!(binaryFun, fun);
static if (fun.length > 1)
@ -3756,7 +3756,7 @@ if (isSomeChar!C)
@safe pure unittest
{
import std.algorithm.comparison : equal;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
foreach(S; TypeTuple!(string, wstring, dstring))
{
import std.conv : to;

View file

@ -736,7 +736,7 @@ unittest
{
import std.algorithm.iteration : filter;
import std.traits : hasElaborateAssign;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");

View file

@ -481,7 +481,7 @@ if (isNarrowString!R1 && isNarrowString!R2)
import std.exception : assertThrown;
import std.utf : UTFException;
import std.range;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
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]);
@ -1065,7 +1065,7 @@ if (isBidirectionalRange!R &&
@safe unittest
{
import std.algorithm.iteration : filterBidirectional;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
import std.conv : to;
debug(std_algorithm) scope(success)
@ -1367,7 +1367,7 @@ if (isInputRange!InputRange &&
@safe pure unittest
{
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
foreach(R; TypeTuple!(string, wstring, dstring))
{
foreach(E; TypeTuple!(char, wchar, dchar))
@ -1411,7 +1411,7 @@ if (isInputRange!InputRange &&
@safe unittest
{
import std.exception : assertCTFEable;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
void dg() @safe pure nothrow
{
@ -1959,7 +1959,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 : TypeTuple;
import std.uni : toUpper;
debug(std_algorithm) scope(success)
@ -1992,7 +1992,7 @@ if (Ranges.length > 1 && is(typeof(startsWith!pred(haystack, needles))))
import std.algorithm.internal : rndstuff;
import std.algorithm.comparison : equal;
import std.range : retro;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
@ -2090,7 +2090,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
@ -2688,7 +2688,7 @@ unittest
unittest
{
import std.conv : text;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");
@ -3171,7 +3171,7 @@ if (isInputRange!R &&
import std.algorithm.iteration : filter;
import std.conv : to;
import std.range;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
debug(std_algorithm) scope(success)
writeln("unittest @", __FILE__, ":", __LINE__, " done.");

View file

@ -47,7 +47,7 @@ import std.range.primitives;
import std.functional; // : unaryFun, binaryFun;
import std.traits;
// FIXME
import std.typetuple; // : TypeTuple, staticMap, allSatisfy, anySatisfy;
import std.meta; // : TypeTuple, staticMap, allSatisfy, anySatisfy;
// cartesianProduct
/**

View file

@ -68,7 +68,7 @@ Source: $(PHOBOSSRC std/_array.d)
module std.array;
import std.traits;
import std.typetuple;
import std.meta;
import std.functional;
static import std.algorithm; // FIXME, remove with alias of splitter

View file

@ -30,7 +30,7 @@ version (unittest)
// FIXME: When dmd bug #314 is fixed, make these selective.
import std.range; // : chain;
import std.traits; // : functionAttributes, FunctionAttribute, isSafe;
import std.typetuple; // : TypeTuple;
import std.meta; // : TypeTuple;
}

View file

@ -1263,7 +1263,7 @@ unittest // 11148
assert(__traits(compiles, foo(cbi)));
assert(__traits(compiles, foo(ibi)));
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
import std.conv : to;
foreach (T1; TypeTuple!(BigInt, const(BigInt), immutable(BigInt)))
@ -1343,7 +1343,7 @@ unittest // 13391
BigInt x2 = "123456789123456789";
BigInt x3 = "123456789123456789123456789";
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
assert((x1 * T.max) / T.max == x1);
@ -1371,7 +1371,7 @@ unittest // 13391
unittest // 13963
{
BigInt x = 1;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
foreach(Int; TypeTuple!(byte, ubyte, short, ushort, int, uint))
{
assert(is(typeof(x % Int(1)) == int));

View file

@ -2160,7 +2160,7 @@ private ulong swapEndianImpl(ulong val) @trusted pure nothrow @nogc
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(bool, byte, ubyte, short, ushort, int, uint, long, ulong, char, wchar, dchar))
{
scope(failure) writefln("Failed type: %s", T.stringof);
@ -2276,7 +2276,7 @@ private auto nativeToBigEndianImpl(T)(T val) @safe pure nothrow @nogc
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(bool, byte, ubyte, short, ushort, int, uint, long, ulong,
char, wchar, dchar
/* The trouble here is with floats and doubles being compared against nan
@ -2450,7 +2450,7 @@ private auto nativeToLittleEndianImpl(T)(T val) @safe pure nothrow @nogc
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(bool, byte, ubyte, short, ushort, int, uint, long, ulong,
char, wchar, dchar/*,
float, double*/))
@ -2580,7 +2580,7 @@ private template isFloatOrDouble(T)
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(float, double))
{
static assert(isFloatOrDouble!(T));
@ -2609,7 +2609,7 @@ private template canSwapEndianness(T)
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(bool, ubyte, byte, ushort, short, uint, int, ulong,
long, char, wchar, dchar, float, double))
{
@ -3700,7 +3700,7 @@ unittest
{
import std.format : format;
import std.array;
import std.typetuple;
import std.meta;
foreach(endianness; TypeTuple!(Endian.bigEndian, Endian.littleEndian))
{
auto toWrite = appender!(ubyte[])();
@ -3775,7 +3775,7 @@ unittest
unittest
{
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
assert(countTrailingZeros(cast(T)0) == 8 * T.sizeof);
@ -3856,7 +3856,7 @@ unittest
unittest
{
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
assert(countBitsSet(cast(T)0) == 0);
@ -3957,7 +3957,7 @@ unittest
import std.algorithm : equal;
import std.range: iota;
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong))
{
assert(bitsSet(cast(T)0).empty);

View file

@ -81,7 +81,7 @@ private
import std.string;
import std.traits;
import std.typecons;
import std.typetuple;
import std.meta;
template hasLocalAliasing(T...)
{

View file

@ -424,7 +424,7 @@ public import std.container.dlist;
public import std.container.rbtree;
public import std.container.slist;
import std.typetuple;
import std.meta;
/* The following documentation and type $(D TotalContainer) are

View file

@ -635,7 +635,7 @@ final class RedBlackTree(T, alias less = "a < b", bool allowDuplicates = false)
{
import std.range.primitives;
import std.range : Take;
import std.typetuple : allSatisfy;
import std.meta : allSatisfy;
import std.traits;
alias _less = binaryFun!less;

View file

@ -25,7 +25,7 @@ public import std.ascii : LetterCase;
import std.range.primitives;
import std.traits;
import std.typetuple;
import std.meta;
private string convFormat(Char, Args...)(in Char[] fmt, Args args)
{

View file

@ -31077,7 +31077,7 @@ unittest
import std.range;
import std.string;
import std.typecons;
import std.typetuple;
import std.meta;
static struct Rand3Letters
{
@ -31346,7 +31346,7 @@ unittest
import std.range;
import std.string;
import std.typecons;
import std.typetuple;
import std.meta;
auto std1 = SysTime(DateTime(2012, 12, 21, 13, 14, 15), UTC());
auto std2 = SysTime(DateTime(2012, 12, 21, 13, 14, 0), UTC());
@ -31672,7 +31672,7 @@ unittest
import std.format : format;
import std.string;
import std.typecons;
import std.typetuple;
import std.meta;
static string genTest(size_t index)
{
@ -32800,7 +32800,7 @@ unittest
import std.algorithm;
import std.string;
import std.typecons;
import std.typetuple;
import std.meta;
foreach(cr; TypeTuple!(function(string a){return cast(ubyte[])a;},
function(string a){return map!(b => cast(char)b)(a.representation);}))

View file

@ -62,7 +62,7 @@ $(TR $(TDNW Implementation helpers) $(TD $(MYREF digestLength) $(MYREF WrapperDi
module std.digest.digest;
import std.traits;
import std.typetuple : allSatisfy;
import std.meta : allSatisfy;
public import std.ascii : LetterCase;

View file

@ -2043,7 +2043,7 @@ unittest
unittest
{
import std.range;
import std.typetuple;
import std.meta;
{
import std.conv : to;

View file

@ -426,7 +426,7 @@ unittest
// purity and safety inference test
unittest
{
import std.typetuple;
import std.meta;
foreach (EncloseSafe; TypeTuple!(false, true))
foreach (EnclosePure; TypeTuple!(false, true))

View file

@ -27,7 +27,7 @@ import std.path;
import std.range.primitives;
import std.traits;
import std.typecons;
import std.typetuple;
import std.meta;
import std.internal.cstring;
version (Windows)

View file

@ -64,7 +64,7 @@ import core.vararg;
import std.exception;
import std.range.primitives;
import std.traits;
import std.typetuple;
import std.meta;
version(CRuntime_DigitalMars)
{

View file

@ -862,7 +862,7 @@ unittest
unittest
{
import std.typetuple : staticMap;
import std.meta : staticMap;
import std.typecons : Tuple, tuple;
alias funs = staticMap!(unaryFun, "a", "a * 2", "a * 3", "a * a", "-a");
alias afun = adjoin!funs;
@ -1410,7 +1410,7 @@ Forwards function arguments with saving ref-ness.
*/
template forward(args...)
{
import std.typetuple;
import std.meta;
static if (args.length)
{

View file

@ -5,7 +5,7 @@ Used with the dummy ranges for testing higher order ranges.
module std.internal.test.dummyrange;
import std.typecons;
import std.typetuple;
import std.meta;
import std.range.primitives;
enum RangeType

View file

@ -539,7 +539,7 @@ auto abs(Num)(Num y) @safe pure nothrow @nogc
@safe pure nothrow @nogc unittest
{
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(float, double, real))
{
T f = 3;
@ -2451,7 +2451,7 @@ unittest
unittest
{
import std.typetuple, std.typecons;
import std.meta, std.typecons;
foreach (T; TypeTuple!(real, double, float))
{
@ -2506,7 +2506,7 @@ unittest
unittest
{
import std.typetuple: TypeTuple;
import std.meta: TypeTuple;
void foo() {
foreach (T; TypeTuple!(real, double, float))
{
@ -4647,7 +4647,7 @@ bool isNaN(X)(X x) @nogc @trusted pure nothrow
@safe pure nothrow @nogc unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(float, double, real))
{
@ -4810,7 +4810,7 @@ int isSubnormal(X)(X x) @trusted pure nothrow @nogc
///
@safe pure nothrow @nogc unittest
{
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(float, double, real))
{
@ -5043,7 +5043,7 @@ R copysign(R, X)(X to, R from) @trusted pure nothrow @nogc
@safe pure nothrow @nogc unittest
{
import std.typetuple;
import std.meta;
foreach (X; TypeTuple!(float, double, real, int, long))
{

View file

@ -171,7 +171,7 @@ import std.stream;
import std.string;
import std.traits;
import std.typecons;
import std.typetuple;
import std.meta;
import std.internal.cstring;

View file

@ -114,7 +114,7 @@ private template CustomFloatParams(uint bits)
private template CustomFloatParams(uint precision, uint exponentWidth, CustomFloatFlags flags)
{
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
alias CustomFloatParams =
TypeTuple!(
precision,
@ -175,7 +175,7 @@ struct CustomFloat(uint precision, // fraction bits (23 for float)
precision + exponentWidth > 0)
{
import std.bitmanip;
import std.typetuple;
import std.meta;
private:
// get the correct unsigned bitfield type to support > 32 bits
template uType(uint bits)
@ -631,7 +631,7 @@ public:
unittest
{
import std.typetuple;
import std.meta;
alias FPTypes =
TypeTuple!(
CustomFloat!(5, 10),
@ -1448,7 +1448,7 @@ euclideanDistance(Range1, Range2, F)(Range1 a, Range2 b, F limit)
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(double, const double, immutable double))
{
T[] a = [ 1.0, 2.0, ];
@ -1538,7 +1538,7 @@ dotProduct(F1, F2)(in F1[] avector, in F2[] bvector)
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(double, const double, immutable double))
{
T[] a = [ 1.0, 2.0, ];
@ -1582,7 +1582,7 @@ cosineSimilarity(Range1, Range2)(Range1 a, Range2 b)
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(double, const double, immutable double))
{
T[] a = [ 1.0, 2.0, ];
@ -1732,7 +1732,7 @@ if (isInputRange!Range &&
unittest
{
import std.typetuple;
import std.meta;
foreach(T; TypeTuple!(double, const double, immutable double))
{
T[] p = [ 0.0, 0, 0, 1 ];

View file

@ -89,7 +89,7 @@ import std.math;
import std.range;
import std.traits;
import std.typecons;
import std.typetuple;
import std.meta;
version(OSX)
{

View file

@ -2691,7 +2691,7 @@ unittest
else version (Posix) valid ~= pfdep;
else static assert (0);
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(char[], const(char)[], string, wchar[],
const(wchar)[], wstring, dchar[], const(dchar)[], dstring))
{

View file

@ -66,8 +66,8 @@ import std.traits;
version(unittest)
{
static import std.typetuple;
package alias PseudoRngTypes = std.typetuple.TypeTuple!(MinstdRand0, MinstdRand, Mt19937, Xorshift32, Xorshift64,
static import std.meta;
package alias PseudoRngTypes = TypeTuple!(MinstdRand0, MinstdRand, Mt19937, Xorshift32, Xorshift64,
Xorshift96, Xorshift128, Xorshift160, Xorshift192);
}
@ -515,7 +515,7 @@ unittest
assert(rnd.front == 399268537);
// Check .save works
foreach (Type; std.typetuple.TypeTuple!(MinstdRand0, MinstdRand))
foreach (Type; TypeTuple!(MinstdRand0, MinstdRand))
{
auto rnd1 = Type(unpredictableSeed);
auto rnd2 = rnd1.save;
@ -788,7 +788,7 @@ unittest
{
import std.range;
// Check .save works
foreach(Type; std.typetuple.TypeTuple!(Mt19937))
foreach(Type; TypeTuple!(Mt19937))
{
auto gen1 = Type(unpredictableSeed);
auto gen2 = gen1.save;
@ -806,7 +806,7 @@ unittest
0x9d2c5680, 15,
0xefc60000, 18);
foreach (R; std.typetuple.TypeTuple!(MT!(uint, 32), MT!(ulong, 32), MT!(ulong, 48), MT!(ulong, 64)))
foreach (R; TypeTuple!(MT!(uint, 32), MT!(ulong, 32), MT!(ulong, 48), MT!(ulong, 64)))
auto a = R();
}
@ -1061,7 +1061,7 @@ unittest
[0UL, 246875399, 3690007200, 1264581005, 3906711041, 1866187943, 2481925219, 2464530826, 1604040631, 3653403911]
];
alias XorshiftTypes = std.typetuple.TypeTuple!(Xorshift32, Xorshift64, Xorshift96, Xorshift128, Xorshift160, Xorshift192);
alias XorshiftTypes = TypeTuple!(Xorshift32, Xorshift64, Xorshift96, Xorshift128, Xorshift160, Xorshift192);
foreach (I, Type; XorshiftTypes)
{
@ -1436,7 +1436,7 @@ if ((isIntegral!(CommonType!(T1, T2)) || isSomeChar!(CommonType!(T1, T2))) &&
auto c = uniform(0.0, 1.0);
assert(0 <= c && c < 1);
foreach (T; std.typetuple.TypeTuple!(char, wchar, dchar, byte, ubyte, short, ushort,
foreach (T; TypeTuple!(char, wchar, dchar, byte, ubyte, short, ushort,
int, uint, long, ulong, float, double, real))
{
T lo = 0, hi = 100;
@ -1490,7 +1490,7 @@ if ((isIntegral!(CommonType!(T1, T2)) || isSomeChar!(CommonType!(T1, T2))) &&
auto reproRng = Xorshift(239842);
foreach (T; std.typetuple.TypeTuple!(char, wchar, dchar, byte, ubyte, short,
foreach (T; TypeTuple!(char, wchar, dchar, byte, ubyte, short,
ushort, int, uint, long, ulong))
{
T lo = T.min + 10, hi = T.max - 10;
@ -1609,7 +1609,7 @@ if (!is(T == enum) && (isIntegral!T || isSomeChar!T))
@safe unittest
{
foreach(T; std.typetuple.TypeTuple!(char, wchar, dchar, byte, ubyte, short, ushort,
foreach(T; TypeTuple!(char, wchar, dchar, byte, ubyte, short, ushort,
int, uint, long, ulong))
{
T init = uniform!T();
@ -1756,11 +1756,11 @@ body
@safe unittest
{
import std.typetuple;
import std.meta;
foreach (UniformRNG; PseudoRngTypes)
{
foreach (T; std.typetuple.TypeTuple!(float, double, real))
foreach (T; TypeTuple!(float, double, real))
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
UniformRNG rng = UniformRNG(unpredictableSeed);
@ -2199,7 +2199,7 @@ unittest
import std.algorithm;
import std.conv;
int[] a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ];
foreach (UniformRNG; std.typetuple.TypeTuple!(void, PseudoRngTypes))
foreach (UniformRNG; TypeTuple!(void, PseudoRngTypes))
{
static if (is(UniformRNG == void))
{

View file

@ -70,7 +70,7 @@ module std.range.interfaces;
import std.range.primitives;
import std.traits;
import std.typetuple;
import std.meta;
/**These interfaces are intended to provide virtual function-based wrappers
* around input ranges with element type E. This is useful where a well-defined

View file

@ -175,7 +175,7 @@ public import std.array;
public import std.typecons : Flag, Yes, No;
import std.traits;
import std.typetuple;
import std.meta;
/**
@ -853,7 +853,7 @@ if (Ranges.length > 0 &&
}
}
import std.typetuple : anySatisfy;
import std.meta : anySatisfy;
static if (anySatisfy!(isInfinite, R))
{

View file

@ -512,7 +512,7 @@ unittest
{
import std.conv : to;
import std.typecons : tuple;
import std.typetuple;
import std.meta;
static struct PutC(C)
{
@ -609,7 +609,7 @@ unittest
unittest
{
import std.format;
import std.typetuple;
import std.meta;
struct PutC(C)
{
void put(C){}
@ -2055,7 +2055,7 @@ if (isNarrowString!(C[]))
@safe pure unittest
{
import std.typetuple;
import std.meta;
foreach(S; TypeTuple!(string, wstring, dstring))
{
@ -2128,7 +2128,7 @@ if (isNarrowString!(T[]))
@safe pure unittest
{
import std.typetuple;
import std.meta;
foreach(S; TypeTuple!(string, wstring, dstring))
{

View file

@ -9,7 +9,7 @@ module std.regex.internal.ir;
package(std.regex):
import std.exception, std.uni, std.typetuple, std.traits, std.range;
import std.exception, std.uni, std.meta, std.traits, std.range;
// just a common trait, may be moved elsewhere
alias BasicElementOf(Range) = Unqual!(ElementEncodingType!Range);

View file

@ -5,7 +5,7 @@
module std.regex.internal.parser;
import std.regex.internal.ir;
import std.algorithm, std.range, std.uni, std.typetuple,
import std.algorithm, std.range, std.uni, std.meta,
std.traits, std.typecons, std.exception;
// package relevant info from parser into a regex object

View file

@ -6,7 +6,7 @@ module std.regex.internal.tests;
package(std.regex):
import std.algorithm, std.conv, std.exception, std.range, std.typecons,
std.typetuple, std.regex;
std.meta, std.regex;
import std.regex.internal.parser : Escapables; // characters that need escaping

View file

@ -1353,7 +1353,7 @@ void main()
{
static import std.file;
import std.algorithm : equal;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
auto deleteme = testFilename();
std.file.write(deleteme, "hello\nworld\n");
@ -1995,7 +1995,7 @@ the contents may well have changed).
std.file.write(deleteme, "hi");
scope(success) std.file.remove(deleteme);
import std.typetuple;
import std.meta;
foreach (T; TypeTuple!(char, wchar, dchar))
{
auto blc = File(deleteme).byLine!(T, T);
@ -3491,7 +3491,7 @@ if (isSomeChar!C && is(Unqual!C == C) && !is(C == enum) &&
unittest
{
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
//we can't actually test readln, so at the very least,
//we test compilability
@ -3748,7 +3748,7 @@ struct lines
unittest
{
static import std.file;
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
//printf("Entering test at line %d\n", __LINE__);
scope(failure) printf("Failed test at line %d\n", __LINE__);

View file

@ -162,7 +162,7 @@ import std.typecons : Flag;
import std.range.primitives;
import std.traits;
import std.typetuple;
import std.meta;
//public imports for backward compatibility
public import std.algorithm : startsWith, endsWith, cmp, count;

View file

@ -150,7 +150,7 @@
*/
module std.traits;
import std.typetuple;
import std.meta;
///////////////////////////////////////////////////////////////////////////////
// Functions

View file

@ -45,7 +45,7 @@ Authors: $(WEB erdani.org, Andrei Alexandrescu),
module std.typecons;
import std.traits;
// FIXME
import std.typetuple; // : TypeTuple, allSatisfy;
import std.meta; // : TypeTuple, allSatisfy;
debug(Unique) import std.stdio;
@ -418,7 +418,7 @@ Params:
*/
template Tuple(Specs...)
{
import std.typetuple : staticMap;
import std.meta : staticMap;
// Parse (type,name) pairs (FieldSpecs) out of the specified
// arguments. Some fields would have name, others not.
@ -960,7 +960,7 @@ unittest
ReverseTupleType!T reverse(T)(T t)
if (isTuple!T)
{
import std.typetuple : Reverse;
import std.meta : Reverse;
// @@@BUG@@@ Cannot be an internal function due to forward reference issues.
// @@@BUG@@@ 9929 Need 'this' when calling template with expanded tuple
@ -3200,7 +3200,7 @@ private static:
{
template Impl(names...)
{
import std.typetuple : Filter;
import std.meta : Filter;
static if (names.length > 0)
{
alias methods = Filter!(pred, MemberFunctionsTuple!(C, names[0]));
@ -3884,7 +3884,7 @@ unittest
template wrap(Targets...)
if (Targets.length >= 1 && allSatisfy!(isMutable, Targets))
{
import std.typetuple : staticMap;
import std.meta : staticMap;
// strict upcast
auto wrap(Source)(inout Source src) @trusted pure nothrow
@ -4057,7 +4057,7 @@ if (Targets.length >= 1 && allSatisfy!(isMutable, Targets))
template wrap(Targets...)
if (Targets.length >= 1 && !allSatisfy!(isMutable, Targets))
{
import std.typetuple : staticMap;
import std.meta : staticMap;
alias wrap = .wrap!(staticMap!(Unqual, Targets));
}
@ -4291,7 +4291,7 @@ unittest
// Make a tuple of non-static function symbols
private template GetOverloadedMethods(T)
{
import std.typetuple : Filter;
import std.meta : Filter;
alias allMembers = TypeTuple!(__traits(allMembers, T));
template follows(size_t i = 0)
@ -4316,7 +4316,7 @@ private template GetOverloadedMethods(T)
enum isMethod = false;
}
alias follows = TypeTuple!(
std.typetuple.Filter!(isMethod, __traits(getOverloads, T, name)),
Filter!(isMethod, __traits(getOverloads, T, name)),
follows!(i + 1));
}
}

View file

@ -43,7 +43,7 @@
deprecated("Please use std.typetuple instead. This module will be removed in March 2015.")
module std.typelist;
version(unittest) {
import std.typetuple;
import std.meta;
}
/**

View file

@ -649,7 +649,7 @@ CLUSTER = $(S_LINK Grapheme cluster, grapheme cluster)
module std.uni;
import core.stdc.stdlib;
import std.traits, std.typetuple;
import std.traits, std.meta;
import std.range.primitives;

View file

@ -545,7 +545,7 @@ unittest
result = decode("%41%42%43");
debug(uri) writeln(result);
import std.typetuple : TypeTuple;
import std.meta : TypeTuple;
foreach (StringType; TypeTuple!(char[], wchar[], dchar[], string, wstring, dstring))
{
import std.conv : to;

View file

@ -22,7 +22,7 @@ module std.utf;
import std.range.primitives;
import std.traits; // isSomeChar, isSomeString
import std.typetuple; // TypeTuple
import std.meta; // TypeTuple
//debug=utf; // uncomment to turn on debugging printf's

View file

@ -126,7 +126,7 @@ import std.traits;
*/
public struct UUID
{
import std.typetuple : allSatisfy;
import std.meta : allSatisfy;
import std.traits : isIntegral;
private:
@ -418,7 +418,7 @@ public struct UUID
@safe pure unittest
{
import std.exception;
import std.typetuple;
import std.meta;
import std.conv : to;
foreach(S; TypeTuple!(char[], const(char)[], immutable(char)[],
@ -1355,7 +1355,7 @@ unittest
@safe pure unittest
{
import std.exception;
import std.typetuple;
import std.meta;
import std.conv : to;
struct TestRange(bool forward)

View file

@ -66,7 +66,7 @@
module std.variant;
import core.stdc.string, std.conv, std.exception, std.traits, std.typecons,
std.typetuple;
std.meta;
/++
Gives the $(D sizeof) the largest type given.