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