From 018e1ba581ec6f01f069a45ec4cf89f152b44d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 19 Mar 2025 15:41:36 +0100 Subject: remerge --- libcutl/cutl/meta/polymorphic-p.hxx | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 libcutl/cutl/meta/polymorphic-p.hxx (limited to 'libcutl/cutl/meta/polymorphic-p.hxx') diff --git a/libcutl/cutl/meta/polymorphic-p.hxx b/libcutl/cutl/meta/polymorphic-p.hxx new file mode 100644 index 0000000..dd820db --- /dev/null +++ b/libcutl/cutl/meta/polymorphic-p.hxx @@ -0,0 +1,50 @@ +// file : cutl/meta/polymorphic-p.hxx +// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +// license : MIT; see accompanying LICENSE file + +#ifndef CUTL_META_POLYMORPHIC_HXX +#define CUTL_META_POLYMORPHIC_HXX + +#include +#include + +namespace cutl +{ + namespace meta + { + template + struct polymorphic_p + { + typedef typename remove_cv::r X; + + template + struct impl + { + static const bool r = false; + }; + + template + struct impl + { + struct t1: Y + { + t1 (); + }; + + struct t2: Y + { + t2 (); + + virtual + ~t2 () throw (); + }; + + static const bool r = sizeof (t1) == sizeof (t2); + }; + + static const bool r = impl::r>::r; + }; + } +} + +#endif // CUTL_META_POLYMORPHIC_HXX -- cgit v1.2.3