This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ class TypeInfo
427427/*
428428Run-time type information for scalar types (int for now).
429429*/
430- template RTTypeid (T)
430+ template __typeid (T)
431431if (is (T == int ))
432432{
433433 class Impl : TypeInfo
@@ -450,11 +450,11 @@ if (is(T == int))
450450 return 1 ;
451451 }
452452
453- override string toString () const pure nothrow @safe { return T.stringof; }
453+ override string toString () { return T.stringof; }
454454
455455 override size_t getHash (scope const void * p) @nogc @trusted
456456 {
457- return * cast (const T * )p;
457+ return * cast (const T * ) p;
458458 }
459459
460460 override bool equals (in void * p1, in void * p2) @nogc @trusted
@@ -490,12 +490,12 @@ if (is(T == int))
490490 }
491491
492492 // On-demand singleton object in static storage
493- immutable RTTypeid = new Impl;
493+ immutable __typeid = new Impl;
494494}
495495
496496unittest
497497{
498- alias id = RTTypeid ! int ;
498+ alias id = __typeid ! int ;
499499 static assert (id == id && id <= id && id >= id);
500500 static assert (id.toString == " int" );
501501 int a = 42 , b = 42 , c = 43 ;
You can’t perform that action at this time.
0 commit comments