// file : cult/meta/polymorphic-p.hxx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2010 Boris Kolpackov // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef CULT_META_POLYMORPHIC_HXX #define CULT_META_POLYMORPHIC_HXX #include #include #include namespace Cult { namespace Meta { template class polymorphic_p { typedef typename remove_cv::R X; template struct impl { static const Boolean r = false; }; template struct impl { //@@ private struct S1 : Y { S1 (); }; struct S2 : Y { S2 (); virtual ~S2 () throw (); }; static const Boolean r = sizeof (S1) == sizeof (S2); }; public: static const Boolean r = impl::r>::r; }; } } #endif // CULT_META_POLYMORPHIC_HXX