Browse Source

putil: workaround macOS 10.6 compile error until #300 is fixed

[skip ci]
rdb 7 years ago
parent
commit
283d43f988
2 changed files with 6 additions and 4 deletions
  1. 3 2
      panda/src/putil/bitMask.cxx
  2. 3 2
      panda/src/putil/doubleBitMask.cxx

+ 3 - 2
panda/src/putil/bitMask.cxx

@@ -12,13 +12,14 @@
  */
 
 #include "bitMask.h"
-#include <type_traits>
 
 template class BitMask<uint16_t, 16>;
 template class BitMask<uint32_t, 32>;
 template class BitMask<uint64_t, 64>;
 
-#ifndef CPPPARSER
+#if !defined(CPPPARSER) && !defined(__APPLE__)
+#include <type_traits>
+
 static_assert(std::is_literal_type<BitMask16>::value, "BitMask16 is not a literal type");
 static_assert(std::is_literal_type<BitMask32>::value, "BitMask32 is not a literal type");
 static_assert(std::is_literal_type<BitMask64>::value, "BitMask64 is not a literal type");

+ 3 - 2
panda/src/putil/doubleBitMask.cxx

@@ -12,12 +12,13 @@
  */
 
 #include "doubleBitMask.h"
-#include <type_traits>
 
 template class DoubleBitMask<BitMaskNative>;
 template class DoubleBitMask<DoubleBitMaskNative>;
 
-#ifndef CPPPARSER
+#if !defined(CPPPARSER) && !defined(__APPLE__)
+#include <type_traits>
+
 static_assert(std::is_literal_type<DoubleBitMaskNative>::value, "DoubleBitMaskNative is not a literal type");
 static_assert(std::is_literal_type<QuadBitMaskNative>::value, "QuadBitMaskNative is not a literal type");
 #endif