зеркало из https://github.com/mozilla/pjs.git
POD trait for |long long| family, attempt to rambo Winx64 back to life. (rs=luke)
This commit is contained in:
Родитель
c8635504e0
Коммит
8e4b8bf07f
|
@ -153,19 +153,21 @@ template <class T> struct StripConst<const T> { typedef T result; };
|
|||
* Traits class for identifying POD types. Until C++0x, there is no automatic
|
||||
* way to detect PODs, so for the moment it is done manually.
|
||||
*/
|
||||
template <class T> struct IsPodType { static const bool result = false; };
|
||||
template <> struct IsPodType<char> { static const bool result = true; };
|
||||
template <> struct IsPodType<signed char> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned char> { static const bool result = true; };
|
||||
template <> struct IsPodType<short> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned short> { static const bool result = true; };
|
||||
template <> struct IsPodType<int> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned int> { static const bool result = true; };
|
||||
template <> struct IsPodType<long> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned long> { static const bool result = true; };
|
||||
template <> struct IsPodType<float> { static const bool result = true; };
|
||||
template <> struct IsPodType<double> { static const bool result = true; };
|
||||
template <typename T> struct IsPodType<T *> { static const bool result = true; };
|
||||
template <class T> struct IsPodType { static const bool result = false; };
|
||||
template <> struct IsPodType<char> { static const bool result = true; };
|
||||
template <> struct IsPodType<signed char> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned char> { static const bool result = true; };
|
||||
template <> struct IsPodType<short> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned short> { static const bool result = true; };
|
||||
template <> struct IsPodType<int> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned int> { static const bool result = true; };
|
||||
template <> struct IsPodType<long> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned long> { static const bool result = true; };
|
||||
template <> struct IsPodType<long long> { static const bool result = true; };
|
||||
template <> struct IsPodType<unsigned long long> { static const bool result = true; };
|
||||
template <> struct IsPodType<float> { static const bool result = true; };
|
||||
template <> struct IsPodType<double> { static const bool result = true; };
|
||||
template <typename T> struct IsPodType<T *> { static const bool result = true; };
|
||||
|
||||
/* Return the size/end of an array without using macros. */
|
||||
template <class T, size_t N> inline T *ArraySize(T (&)[N]) { return N; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче