mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-19 02:25:35 +00:00
Put MSVC back into the dumb compiler's corner.
It fails to compile std::trivially_copyable for forward-declared enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230023 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1b740e2667
commit
6039d05a22
@ -28,10 +28,10 @@ namespace llvm {
|
|||||||
/// type can be copied around with memcpy instead of running ctors etc.
|
/// type can be copied around with memcpy instead of running ctors etc.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct isPodLike {
|
struct isPodLike {
|
||||||
// std::is_trivially copyable is available in libc++ with clang, libstdc++
|
// std::is_trivially_copyable is available in libc++ with clang, libstdc++
|
||||||
// that comes with GCC 5 and MSVC 2013.
|
// that comes with GCC 5.
|
||||||
#if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) || \
|
#if (__has_feature(is_trivially_copyable) && defined(_LIBCPP_VERSION)) || \
|
||||||
(defined(__GNUC__) && __GNUC__ >= 5) || defined(_MSC_VER)
|
(defined(__GNUC__) && __GNUC__ >= 5)
|
||||||
// If the compiler supports the is_trivially_copyable trait use it, as it
|
// If the compiler supports the is_trivially_copyable trait use it, as it
|
||||||
// matches the definition of isPodLike closely.
|
// matches the definition of isPodLike closely.
|
||||||
static const bool value = std::is_trivially_copyable<T>::value;
|
static const bool value = std::is_trivially_copyable<T>::value;
|
||||||
|
Loading…
Reference in New Issue
Block a user