2 * TypeInfo support code.
4 * Copyright: Copyright Digital Mars 2004 - 2009.
5 * License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 * Authors: Walter Bright
9 /* Copyright Digital Mars 2004 - 2009.
10 * Distributed under the Boost Software License, Version 1.0.
11 * (See accompanying file LICENSE or copy at
12 * http://www.boost.org/LICENSE_1_0.txt)
14 module rt.typeinfo.ti_real;
16 private import rt.util.typeinfo;
20 class TypeInfo_e : TypeInfo
28 override string toString() const { return F.stringof; }
30 override size_t getHash(in void* p) const @trusted
32 return Floating!F.hashOf(*cast(F*)p);
35 override bool equals(in void* p1, in void* p2) const @trusted
37 return Floating!F.equals(*cast(F*)p1, *cast(F*)p2);
40 override int compare(in void* p1, in void* p2) const @trusted
42 return Floating!F.compare(*cast(F*)p1, *cast(F*)p2);
45 override @property size_t tsize() const
50 override void swap(void *p1, void *p2) const @trusted
53 *cast(F*)p1 = *cast(F*)p2;
57 override const(void)[] initializer() const @trusted
63 override @property size_t talign() const