Sfoglia il codice sorgente

common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC.

bunnei 5 anni fa
parent
commit
d9205f82b3
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      src/common/intrusive_red_black_tree.h

+ 4 - 0
src/common/intrusive_red_black_tree.h

@@ -509,7 +509,11 @@ private:
 
 
 private:
 private:
     static constexpr TypedStorage<Derived> DerivedStorage = {};
     static constexpr TypedStorage<Derived> DerivedStorage = {};
+
+#ifndef _MSC_VER
+    // TODO(bunnei): Enable on MSVC once this can be const evaluated by the compiler
     static_assert(GetParent(GetNode(GetPointer(DerivedStorage))) == GetPointer(DerivedStorage));
     static_assert(GetParent(GetNode(GetPointer(DerivedStorage))) == GetPointer(DerivedStorage));
+#endif
 };
 };
 
 
 template <auto T, class Derived = impl::GetParentType<T>>
 template <auto T, class Derived = impl::GetParentType<T>>