mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 23:19:06 +08:00
Simplified StorageType<>
This commit is contained in:
parent
2b8996b82c
commit
a24cbcc493
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user