This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ class TypeInfo
427
427
/*
428
428
Run-time type information for scalar types (int for now).
429
429
*/
430
- template RTTypeid (T)
430
+ template __typeid (T)
431
431
if (is (T == int ))
432
432
{
433
433
class Impl : TypeInfo
@@ -450,11 +450,11 @@ if (is(T == int))
450
450
return 1 ;
451
451
}
452
452
453
- override string toString () const pure nothrow @safe { return T.stringof; }
453
+ override string toString () { return T.stringof; }
454
454
455
455
override size_t getHash (scope const void * p) @nogc @trusted
456
456
{
457
- return * cast (const T * )p;
457
+ return * cast (const T * ) p;
458
458
}
459
459
460
460
override bool equals (in void * p1, in void * p2) @nogc @trusted
@@ -490,12 +490,12 @@ if (is(T == int))
490
490
}
491
491
492
492
// On-demand singleton object in static storage
493
- immutable RTTypeid = new Impl;
493
+ immutable __typeid = new Impl;
494
494
}
495
495
496
496
unittest
497
497
{
498
- alias id = RTTypeid ! int ;
498
+ alias id = __typeid ! int ;
499
499
static assert (id == id && id <= id && id >= id);
500
500
static assert (id.toString == " int" );
501
501
int a = 42 , b = 42 , c = 43 ;
You can’t perform that action at this time.
0 commit comments