@@ -277,7 +277,7 @@ struct FormattedFloating(T)
277
277
278
278
// /
279
279
void toString (C = char , W)(scope ref W w) scope const
280
- if (isSomeChar! C && isOutputRange ! (W, C) )
280
+ if (isSomeChar! C)
281
281
{
282
282
C[512 ] buf = void ;
283
283
auto n = printFloatingPoint(value, spec, buf);
@@ -304,7 +304,7 @@ struct HexAddress(T)
304
304
305
305
// /
306
306
void toString (C = char , W)(scope ref W w) scope const
307
- if (isSomeChar! C && isOutputRange ! (W, C) )
307
+ if (isSomeChar! C)
308
308
{
309
309
enum N = T.sizeof * 2 ;
310
310
static if (isFastBuffer! W)
@@ -421,7 +421,7 @@ version (mir_test) unittest
421
421
Decodes `char` `c` to the form `u00XX`, where `XX` is 2 hexadecimal characters.
422
422
+/
423
423
ref W put_xXX (C = char , W)(scope return ref W w, char c)
424
- if (isSomeChar! C && isOutputRange ! (W, C) )
424
+ if (isSomeChar! C)
425
425
{
426
426
ubyte [2 ] spl;
427
427
spl[0 ] = c >> 4 ;
@@ -438,7 +438,7 @@ ref W put_xXX(C = char, W)(scope return ref W w, char c)
438
438
Decodes `char` `c` to the form `u00XX`, where `XX` is 2 hexadecimal characters.
439
439
+/
440
440
ref W put_uXXXX (C = char , W)(scope return ref W w, char c)
441
- if (isSomeChar! C && isOutputRange ! (W, C) )
441
+ if (isSomeChar! C)
442
442
{
443
443
ubyte [2 ] spl;
444
444
spl[0 ] = c >> 4 ;
@@ -457,7 +457,7 @@ ref W put_uXXXX(C = char, W)(scope return ref W w, char c)
457
457
Decodes ushort `c` to the form `uXXXX`, where `XXXX` is 2 hexadecimal characters.
458
458
+/
459
459
ref W put_uXXXX (C = char , W)(scope return ref W w, ushort c)
460
- if (isSomeChar! C && isOutputRange ! (W, C) )
460
+ if (isSomeChar! C)
461
461
{
462
462
ubyte [4 ] spl;
463
463
spl[0 ] = (c >> 12 ) & 0xF ;
@@ -476,7 +476,7 @@ ref W put_uXXXX(C = char, W)(scope return ref W w, ushort c)
476
476
477
477
// /
478
478
ref W printElement (C, EscapeFormat escapeFormat = EscapeFormat.ion, W)(scope return ref W w, scope const (C)[] c)
479
- if (isSomeChar! C && isOutputRange ! (W, C) )
479
+ if (isSomeChar! C)
480
480
{
481
481
static immutable C[1 ] quote = ' \" ' ;
482
482
return w
@@ -487,7 +487,7 @@ ref W printElement(C, EscapeFormat escapeFormat = EscapeFormat.ion, W)(scope ret
487
487
488
488
// /
489
489
ref W printElement (C = char , EscapeFormat escapeFormat = EscapeFormat.ion, W, T)(scope return ref W w, scope auto ref const T c)
490
- if (! isSomeString! T && isOutputRange ! (W, C) )
490
+ if (! isSomeString! T)
491
491
{
492
492
return w.print! C(c);
493
493
}
@@ -496,7 +496,7 @@ ref W printElement(C = char, EscapeFormat escapeFormat = EscapeFormat.ion, W, T)
496
496
Multiargument overload.
497
497
+/
498
498
ref W print (C = char , W, Args... )(scope return ref W w, scope auto ref const Args args)
499
- if (isSomeChar! C && isOutputRange ! (W, C) && Args.length > 1 )
499
+ if (isSomeChar! C && Args.length > 1 )
500
500
{
501
501
foreach (i, ref c; args)
502
502
static if (i < Args.length - 1 )
@@ -507,7 +507,7 @@ ref W print(C = char, W, Args...)(scope return ref W w, scope auto ref const Arg
507
507
508
508
// / Prints enums
509
509
ref W print (C = char , W, T)(scope return ref W w, const T c)
510
- if (isSomeChar! C && isOutputRange ! (W, C) && is (T == enum ))
510
+ if (isSomeChar! C && is (T == enum ))
511
511
{
512
512
import mir.enums: getEnumIndex, enumStrings;
513
513
import mir.utility: _expect;
@@ -544,7 +544,7 @@ version (mir_test) unittest
544
544
545
545
// / Prints boolean
546
546
ref W print (C = char , W)(scope return ref W w, bool c)
547
- if (isSomeChar! C && isOutputRange ! (W, C) )
547
+ if (isSomeChar! C)
548
548
{
549
549
enum N = 5 ;
550
550
static if (isFastBuffer! W)
@@ -574,7 +574,7 @@ version (mir_test) unittest
574
574
// / Prints associative array
575
575
pragma (inline, false )
576
576
ref W print (C = char , W, V, K)(scope return ref W w, scope const V[K] c)
577
- if (isSomeChar! C && isOutputRange ! (W, C) )
577
+ if (isSomeChar! C)
578
578
{
579
579
enum C left = ' [' ;
580
580
enum C right = ' ]' ;
@@ -609,7 +609,7 @@ version (mir_test) unittest
609
609
// / Prints array
610
610
pragma (inline, false )
611
611
ref W print (C = char , W, T)(scope return ref W w, scope const (T)[] c)
612
- if (isSomeChar! C && isOutputRange ! (W, C) && ! isSomeChar! T)
612
+ if (isSomeChar! C && ! isSomeChar! T)
613
613
{
614
614
enum C left = ' [' ;
615
615
enum C right = ' ]' ;
@@ -640,7 +640,7 @@ version (mir_test) unittest
640
640
// / Prints escaped character in the form `'c'`.
641
641
pragma (inline, false )
642
642
ref W print (C = char , W)(scope return ref W w, char c)
643
- if (isSomeChar! C && isOutputRange ! (W, C) )
643
+ if (isSomeChar! C)
644
644
{
645
645
w.put(' \' ' );
646
646
if (c >= 0x20 )
@@ -696,15 +696,15 @@ version (mir_test) unittest
696
696
697
697
// / Prints some string
698
698
ref W print (C = char , W)(scope return ref W w, scope const (C)[] c)
699
- if (isSomeChar! C && isOutputRange ! (W, C) )
699
+ if (isSomeChar! C)
700
700
{
701
701
w.put(c);
702
702
return w;
703
703
}
704
704
705
705
// / Prints integers
706
706
ref W print (C = char , W, I)(scope return ref W w, const I c)
707
- if (isSomeChar! C && isOutputRange ! (W, C) && isIntegral! I && ! is (I == enum ))
707
+ if (isSomeChar! C && isIntegral! I && ! is (I == enum ))
708
708
{
709
709
static if (I.sizeof == 16 )
710
710
enum N = 39 ;
@@ -724,7 +724,7 @@ ref W print(C = char, W, I)(scope return ref W w, const I c)
724
724
725
725
// / Prints floating point numbers
726
726
ref W print (C = char , W, T)(scope return ref W w, const T c, NumericSpec spec = NumericSpec.init)
727
- if (isSomeChar! C && isOutputRange ! (W, C) && is (T == float ) || is (T == double ) || is (T == real ))
727
+ if (isSomeChar! C && is (T == float ) || is (T == double ) || is (T == real ))
728
728
{
729
729
import mir.bignum.decimal;
730
730
auto decimal = Decimal! (T.mant_dig < 64 ? 1 : 2 )(c);
@@ -817,7 +817,7 @@ unittest
817
817
// / Prints structs and unions
818
818
pragma (inline, false )
819
819
ref W print (C = char , W, T)(scope return ref W w, ref const T c)
820
- if (isSomeChar! C && isOutputRange ! (W, C) && is (T == struct ) || is (T == union ) && ! is (T : NumericSpec))
820
+ if (isSomeChar! C && is (T == struct ) || is (T == union ) && ! is (T : NumericSpec))
821
821
{
822
822
static if (__traits(hasMember, T, " toString" ))
823
823
{
@@ -880,7 +880,7 @@ ref W print(C = char, W, T)(scope return ref W w, ref const T c)
880
880
// FUTURE: remove it
881
881
pragma (inline, false )
882
882
ref W print (C = char , W, T)(scope return ref W w, scope const T c)
883
- if (isSomeChar! C && isOutputRange ! (W, C) && is (T == struct ) || is (T == union ))
883
+ if (isSomeChar! C && is (T == struct ) || is (T == union ))
884
884
{
885
885
return print! (C, W, T)(w, c);
886
886
}
@@ -903,7 +903,7 @@ version (mir_test) unittest
903
903
// / Prints classes and interfaces
904
904
pragma (inline, false )
905
905
ref W print (C = char , W, T)(scope return ref W w, scope const T c)
906
- if (isSomeChar! C && isOutputRange ! (W, C) && is (T == class ) || is (T == interface ))
906
+ if (isSomeChar! C && is (T == class ) || is (T == interface ))
907
907
{
908
908
enum C[4 ] Null = " null" ;
909
909
static if (__traits(hasMember, T, " toString" ) || __traits(compiles, { scope const (C)[] string_of_c = c; }))
@@ -969,7 +969,7 @@ version (mir_test) unittest
969
969
970
970
// /
971
971
ref W printStaticString (C, size_t N, W)(scope return ref W w, ref scope const C[N] c)
972
- if (isSomeChar! C && isOutputRange ! (W, C) && is (C == char ) || is (C == wchar ) || is (C == dchar ))
972
+ if (isSomeChar! C && is (C == char ) || is (C == wchar ) || is (C == dchar ))
973
973
{
974
974
static if (isFastBuffer! W)
975
975
{
@@ -1017,7 +1017,7 @@ template isFastBuffer(W)
1017
1017
1018
1018
// /
1019
1019
ref W printZeroPad (C = char , W, I)(scope return ref W w, const I c, size_t minimalLength)
1020
- if (isSomeChar! C && isOutputRange ! (W, C) && isIntegral! I && ! is (I == enum ))
1020
+ if (isSomeChar! C && isIntegral! I && ! is (I == enum ))
1021
1021
{
1022
1022
static if (I.sizeof == 16 )
1023
1023
enum N = 39 ;
0 commit comments