aboutsummaryrefslogtreecommitdiff
path: root/cutl/compiler/type-info.ixx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-16 20:29:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-24 16:40:04 +0300
commit8e761289a2446367267c6c0d9a26e734f0f78306 (patch)
treefb495d8c18801f271d124ee48731f10df396ca89 /cutl/compiler/type-info.ixx
parent4c8104756b92b9fa16b3a725e8a6aa620dfd606e (diff)
Get rid of legacy build systems and rename cutl/ to libcutl/
Diffstat (limited to 'cutl/compiler/type-info.ixx')
-rw-r--r--cutl/compiler/type-info.ixx94
1 files changed, 0 insertions, 94 deletions
diff --git a/cutl/compiler/type-info.ixx b/cutl/compiler/type-info.ixx
deleted file mode 100644
index 2f162dc..0000000
--- a/cutl/compiler/type-info.ixx
+++ /dev/null
@@ -1,94 +0,0 @@
-// file : cutl/compiler/type-info.ixx
-// license : MIT; see accompanying LICENSE file
-
-namespace cutl
-{
- namespace compiler
- {
- // base_info
- //
-
- inline
- base_info::
- base_info (type_id const& type_id)
- : type_id_ (type_id), type_info_ (0)
- {
- }
-
- inline
- type_info_t const& base_info::
- type_info () const
- {
- // We need to do delayed lookup because of the unpredictable
- // order in which type information may be added.
- //
- // @@ MT-unsafe
- //
- if (type_info_ == 0)
- type_info_ = &(lookup (type_id_));
-
- return *type_info_;
- }
-
- // type_info
- //
-
- inline
- type_info::
- type_info (type_id_t const& tid)
- : type_id_ (tid)
- {
- }
-
- inline
- type_id_t type_info::
- type_id () const
- {
- return type_id_;
- }
-
- inline
- type_info::base_iterator type_info::
- begin_base () const
- {
- return bases_.begin ();
- }
-
-
- inline
- type_info::base_iterator type_info::
- end_base () const
- {
- return bases_.end ();
- }
-
- inline
- void type_info::
- add_base (type_id_t const& tid)
- {
- bases_.push_back (base_info (tid));
- }
-
- //
- //
- inline type_info const&
- lookup (std::type_info const& tid)
- {
- return lookup (type_id (tid));
- }
-
- template <typename X>
- inline type_info const&
- lookup (X const volatile& x)
- {
- return lookup (typeid (x));
- }
-
- template<typename X>
- inline type_info const&
- lookup ()
- {
- return lookup (typeid (X));
- }
- }
-}