From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- libcutl/cutl/compiler/type-id.ixx | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 libcutl/cutl/compiler/type-id.ixx (limited to 'libcutl/cutl/compiler/type-id.ixx') 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_); + } + } +} -- cgit v1.2.3