Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit fc0de5b

Browse files
committed
Change name from RTTypeid to __typeid
1 parent 1a76c5b commit fc0de5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/object.d

+5-5
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class TypeInfo
427427
/*
428428
Run-time type information for scalar types (int for now).
429429
*/
430-
template RTTypeid(T)
430+
template __typeid(T)
431431
if (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

496496
unittest
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;

0 commit comments

Comments
 (0)