mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
refs #356 Removed IsQuantity trait, no longer used.
This commit is contained in:
@@ -38,25 +38,6 @@ namespace BlackMisc
|
|||||||
class CIcon;
|
class CIcon;
|
||||||
class CVariant;
|
class CVariant;
|
||||||
|
|
||||||
namespace PhysicalQuantities
|
|
||||||
{
|
|
||||||
template <class MU, class PQ> class CPhysicalQuantity;
|
|
||||||
|
|
||||||
//! Traits class to test whether a class is a physical quantity class. Useful for enable_if.
|
|
||||||
template <class T>
|
|
||||||
class IsQuantity
|
|
||||||
{
|
|
||||||
struct yes { char x; };
|
|
||||||
struct no { yes x[2]; };
|
|
||||||
template <class MU, class PQ> static yes test(const CPhysicalQuantity<MU, PQ> &);
|
|
||||||
static no test(...);
|
|
||||||
|
|
||||||
public:
|
|
||||||
//! True if and only if T is derived from CPhysicalQuantity.
|
|
||||||
static const bool value = sizeof(test(*(T *)0)) == sizeof(yes);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This registers the value type T with the BlackMisc meta type system,
|
* This registers the value type T with the BlackMisc meta type system,
|
||||||
* making it available for use with the extended feature set of BlackMisc::CVariant.
|
* making it available for use with the extended feature set of BlackMisc::CVariant.
|
||||||
|
|||||||
Reference in New Issue
Block a user