summaryrefslogtreecommitdiff
path: root/libcutl/cutl/compiler/type-id.ixx
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:21:29 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:21:29 +0200
commitbada6666c70977a058755ccf232e7d67b24adeed (patch)
tree1e92d50cebce96abaf9bce19e36026c47f77b9ba /libcutl/cutl/compiler/type-id.ixx
parenteaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff)
New upstream release
Diffstat (limited to 'libcutl/cutl/compiler/type-id.ixx')
-rw-r--r--libcutl/cutl/compiler/type-id.ixx44
1 files changed, 44 insertions, 0 deletions
diff --git a/libcutl/cutl/compiler/type-id.ixx b/libcutl/cutl/compiler/type-id.ixx
new file mode 100644
index 0000000..2e9f963
--- /dev/null
+++ b/libcutl/cutl/compiler/type-id.ixx
@@ -0,0 +1,44 @@
+// file : cutl/compiler/type-id.ixx
+// copyright : Copyright (c) 2009-2013 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_);
+ }
+ }
+}