Debian Codegraph @

cutl/compiler/type-id.ixx

raw
1 // file : cutl/compiler/type-id.ixx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : MIT; see accompanying LICENSE file
4
5 namespace cutl
6 {
7 namespace compiler
8 {
9 inline
10 type_id::
11 type_id (std::type_info const& ti)
12 : ti_ (&ti)
13 {
14 }
15
16 inline
17 char const* type_id::
18 name () const
19 {
20 return ti_->name ();
21 }
22
23 inline
24 bool
25 operator== (type_id const& x, type_id const& y)
26 {
27 return *x.ti_ == *y.ti_;
28 }
29
30 inline
31 bool
32 operator!= (type_id const& x, type_id const& y)
33 {
34 return *x.ti_ != *y.ti_;
35 }
36
37 inline
38 bool
39 operator< (type_id const& x, type_id const& y)
40 {
41 return x.ti_->before (*y.ti_);
42 }
43 }
44 }