From d9205f82b35c61de9eaa381578f4aceaf94b75b1 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 31 Mar 2021 14:35:46 -0700 Subject: common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. --- src/common/intrusive_red_black_tree.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common/intrusive_red_black_tree.h') diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index c0bbcd457..15f972054 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -509,7 +509,11 @@ private: private: static constexpr TypedStorage 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)); +#endif }; template > -- cgit v1.2.3 From 27a6ef64fd06b7fd5de8d3dc9a3939368593b808 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 1 May 2021 14:16:26 -0700 Subject: fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. --- src/common/intrusive_red_black_tree.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/common/intrusive_red_black_tree.h') diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index 15f972054..1f696fe80 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -509,11 +509,6 @@ private: private: static constexpr TypedStorage 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)); -#endif }; template > -- cgit v1.2.3