Windows support by Ruben Van Boxem.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -142,7 +142,9 @@ namespace std
|
||||
#include <__config>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
@@ -891,12 +893,12 @@ struct _LIBCPP_VISIBLE aligned_storage
|
||||
|
||||
#define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
|
||||
template <size_t _Len>\
|
||||
struct __attribute__ ((__visibility__("default"))) aligned_storage<_Len, n>\
|
||||
struct _LIBCPP_VISIBLE aligned_storage<_Len, n>\
|
||||
{\
|
||||
struct type\
|
||||
struct _ALIGNAS(n) type\
|
||||
{\
|
||||
unsigned char _[_Len];\
|
||||
} __attribute__((__aligned__(n)));\
|
||||
};\
|
||||
}
|
||||
|
||||
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1);
|
||||
@@ -913,7 +915,10 @@ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x400);
|
||||
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
|
||||
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
|
||||
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
|
||||
// MSDN says that MSVC does not support alignment beyond 8192 (=0x2000)
|
||||
#if !defined(_MSC_VER)
|
||||
_CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
|
||||
#endif // !_MSC_VER
|
||||
|
||||
#undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
|
||||
|
||||
@@ -933,7 +938,7 @@ private:
|
||||
typedef typename __promote<_A2>::type __type2;
|
||||
typedef typename __promote<_A3>::type __type3;
|
||||
public:
|
||||
typedef __typeof__(__type1() + __type2() + __type3()) type;
|
||||
typedef decltype(__type1() + __type2() + __type3()) type;
|
||||
};
|
||||
|
||||
template <class _A1, class _A2>
|
||||
@@ -943,7 +948,7 @@ private:
|
||||
typedef typename __promote<_A1>::type __type1;
|
||||
typedef typename __promote<_A2>::type __type2;
|
||||
public:
|
||||
typedef __typeof__(__type1() + __type2()) type;
|
||||
typedef decltype(__type1() + __type2()) type;
|
||||
};
|
||||
|
||||
template <class _A1>
|
||||
|
Reference in New Issue
Block a user