mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
refs #413 Removed TemplateIsBaseOf, no longer needed.
This commit is contained in:
@@ -29,23 +29,6 @@ namespace BlackMisc
|
||||
template <class> class TupleConverter;
|
||||
template <class Derived, class Base = CEmpty> class CValueObject;
|
||||
|
||||
//! Traits class to test whether a class template specialization is a base class of another class.
|
||||
template <template <class...> class Base, class Derived>
|
||||
class TemplateIsBaseOf
|
||||
{
|
||||
struct yes { char x; };
|
||||
struct no { yes x[2]; };
|
||||
template <class... Ts> static yes test(const Base<Ts...> &);
|
||||
static no test(...);
|
||||
|
||||
public:
|
||||
//! True if and only if Derived is derived from a specialization of Base.
|
||||
static const bool value = sizeof(test(std::declval<Derived>())) == sizeof(yes);
|
||||
|
||||
//! std::true_type or std::false_type.
|
||||
using type = std::integral_constant<bool, value>;
|
||||
};
|
||||
|
||||
namespace Private
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user