mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 03:50:35 +08:00
Simplified StorageType<>
This commit is contained in:
@@ -18,22 +18,13 @@ template <>
|
||||
struct IntegerBitLen<0> { enum { Result = 0 }; };
|
||||
|
||||
|
||||
// TODO: fix
|
||||
template <typename T, typename Enable = void>
|
||||
struct StorageTypeImpl { typedef T Type; };
|
||||
struct StorageType { typedef T Type; };
|
||||
|
||||
template <typename T>
|
||||
struct StorageTypeImpl<T, typename EnableIfType<typename T::StorageType>::Type>
|
||||
struct StorageType<T, typename EnableIfType<typename T::StorageType>::Type>
|
||||
{
|
||||
typedef typename T::StorageType Type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class StorageType : public T
|
||||
{
|
||||
StorageType();
|
||||
public:
|
||||
typedef typename StorageTypeImpl<T>::Type Type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user