From cb9ea47e7825b5073d4d645afb94f6326cb7cf4d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 6 Sep 2009 12:52:53 +0200 Subject: Start the libcutl repository --- cutl/compiler/type-id.hxx | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 cutl/compiler/type-id.hxx (limited to 'cutl/compiler/type-id.hxx') diff --git a/cutl/compiler/type-id.hxx b/cutl/compiler/type-id.hxx new file mode 100644 index 0000000..7731f6d --- /dev/null +++ b/cutl/compiler/type-id.hxx @@ -0,0 +1,47 @@ +// file : cutl/compiler/type-id.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef CUTL_COMPILER_TYPE_ID_HXX +#define CUTL_COMPILER_TYPE_ID_HXX + +#include // std::type_info + +namespace cutl +{ + namespace compiler + { + class type_id + { + public: + template + type_id (X const volatile&); + + type_id (std::type_info const&); + + public: + char const* + name () const; + + friend bool + operator== (type_id const&, type_id const&); + + friend bool + operator!= (type_id const&, type_id const&); + + friend bool + operator< (type_id const&, type_id const&); + + private: + std::type_info const* ti_; + }; + + typedef type_id type_id_t; + } +} + +#include +#include + +#endif // CUTL_COMPILER_TYPE_ID_HXX -- cgit v1.1