mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 19:16:13 +03:00
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:
parent
8d9d606ef8
commit
d698887729
48 changed files with 643 additions and 645 deletions
40
std/math.d
40
std/math.d
|
@ -549,14 +549,14 @@ auto abs(Num)(Num y) @safe pure nothrow @nogc
|
|||
|
||||
@safe pure nothrow @nogc unittest
|
||||
{
|
||||
import std.typetuple;
|
||||
foreach (T; TypeTuple!(float, double, real))
|
||||
import std.meta : AliasSeq;
|
||||
foreach (T; AliasSeq!(float, double, real))
|
||||
{
|
||||
T f = 3;
|
||||
assert(abs(f) == f);
|
||||
assert(abs(-f) == f);
|
||||
}
|
||||
foreach (T; TypeTuple!(cfloat, cdouble, creal))
|
||||
foreach (T; AliasSeq!(cfloat, cdouble, creal))
|
||||
{
|
||||
T f = -12+3i;
|
||||
assert(abs(f) == hypot(f.re, f.im));
|
||||
|
@ -2556,9 +2556,9 @@ unittest
|
|||
|
||||
unittest
|
||||
{
|
||||
import std.typetuple, std.typecons;
|
||||
import std.meta, std.typecons;
|
||||
|
||||
foreach (T; TypeTuple!(real, double, float))
|
||||
foreach (T; AliasSeq!(real, double, float))
|
||||
{
|
||||
Tuple!(T, T, int)[] vals = // x,frexp,exp
|
||||
[
|
||||
|
@ -2611,9 +2611,9 @@ unittest
|
|||
|
||||
unittest
|
||||
{
|
||||
import std.typetuple: TypeTuple;
|
||||
import std.meta: AliasSeq;
|
||||
void foo() {
|
||||
foreach (T; TypeTuple!(real, double, float))
|
||||
foreach (T; AliasSeq!(real, double, float))
|
||||
{
|
||||
int exp;
|
||||
const T a = 1;
|
||||
|
@ -2836,8 +2836,8 @@ alias FP_ILOGBNAN = core.stdc.math.FP_ILOGBNAN;
|
|||
|
||||
@trusted nothrow @nogc unittest
|
||||
{
|
||||
import std.typetuple, std.typecons;
|
||||
foreach (F; TypeTuple!(float, double, real))
|
||||
import std.meta, std.typecons;
|
||||
foreach (F; AliasSeq!(float, double, real))
|
||||
{
|
||||
alias T = Tuple!(F, int);
|
||||
T[13] vals = // x, ilogb(x)
|
||||
|
@ -2909,8 +2909,8 @@ float ldexp(float n, int exp) @safe pure nothrow @nogc { return ldexp(cast(real)
|
|||
///
|
||||
@nogc @safe pure nothrow unittest
|
||||
{
|
||||
import std.typetuple;
|
||||
foreach(T; TypeTuple!(float, double, real))
|
||||
import std.meta;
|
||||
foreach(T; AliasSeq!(float, double, real))
|
||||
{
|
||||
T r;
|
||||
|
||||
|
@ -4924,9 +4924,9 @@ 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))
|
||||
foreach(T; AliasSeq!(float, double, real))
|
||||
{
|
||||
// CTFE-able tests
|
||||
assert(isNaN(T.init));
|
||||
|
@ -5107,9 +5107,9 @@ bool 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))
|
||||
foreach (T; AliasSeq!(float, double, real))
|
||||
{
|
||||
T f;
|
||||
for (f = 1.0; !isSubnormal(f); f /= 2)
|
||||
|
@ -5345,11 +5345,11 @@ 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))
|
||||
foreach (X; AliasSeq!(float, double, real, int, long))
|
||||
{
|
||||
foreach (Y; TypeTuple!(float, double, real))
|
||||
foreach (Y; AliasSeq!(float, double, real))
|
||||
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
|
||||
X x = 21;
|
||||
Y y = 23.8;
|
||||
|
@ -7263,8 +7263,8 @@ unittest
|
|||
|
||||
unittest
|
||||
{
|
||||
import std.typetuple;
|
||||
foreach (T; TypeTuple!(float, double, real))
|
||||
import std.meta;
|
||||
foreach (T; AliasSeq!(float, double, real))
|
||||
{
|
||||
T[] values = [-cast(T)NaN(20), -cast(T)NaN(10), -T.nan, -T.infinity,
|
||||
-T.max, -T.max / 2, T(-16.0), T(-1.0).nextDown,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue