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/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