From 224ea3914a08710227f057703b64c8a0aaf4d240 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Thu, 10 Sep 2020 15:15:13 +0200 Subject: [PATCH] deleted file not needed anymore --- container/IsDerivedFrom.h | 50 --------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 container/IsDerivedFrom.h diff --git a/container/IsDerivedFrom.h b/container/IsDerivedFrom.h deleted file mode 100644 index 8142a378..00000000 --- a/container/IsDerivedFrom.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef ISDERIVEDFROM_H_ -#define ISDERIVEDFROM_H_ - -/** - * These template type checks are based on SFINAE - * (https://en.cppreference.com/w/cpp/language/sfinae) - * - * @tparam D Derived Type - * @tparam B Base Type - */ -template -class IsDerivedFrom { - class No { - }; - class Yes { - No no[3]; - }; - - // This will be chosen if B is the base type - static Yes Test(B*); // declared, but not defined - // This will be chosen for anything else - static No Test(... ); // declared, but not defined - -public: - enum { - Is = sizeof(Test(static_cast(0))) == sizeof(Yes) - }; -}; - -template -struct is_same { - static bool const value = false; -}; - -template -struct is_same { - static bool const value = true; -}; - - -template -struct enable_if { - typedef T type; -}; - -template -struct enable_if { }; - - -#endif /* ISDERIVEDFROM_H_ */