From 91425ccb6ff0a416b67ef21eb3ecebb49ba3e748 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 6 May 2025 19:45:03 +0800 Subject: Update C++ standard to C++20 (#6980) * Correct incorrect enum usage on metal * Update C++ standard to C++20 Closes https://github.com/shader-slang/slang/issues/6945 * use bit_cast --- source/slang/slang-ir.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/slang') diff --git a/source/slang/slang-ir.h b/source/slang/slang-ir.h index ea784c9a6..5a1ae94f7 100644 --- a/source/slang/slang-ir.h +++ b/source/slang/slang-ir.h @@ -7,9 +7,6 @@ // similar in spirit to LLVM (but much simpler). // -#if defined(__cpp_lib_bit_cast) -#include -#endif #include "../compiler-core/slang-source-loc.h" #include "../compiler-core/slang-source-map.h" #include "../core/slang-basic.h" @@ -17,6 +14,7 @@ #include "slang-container-pool.h" #include "slang-type-system-shared.h" +#include #include namespace Slang @@ -105,11 +103,7 @@ enum IRMemoryOrder inline int32_t operator&(const IROpMask m, const IROp o) { -#if defined(__cpp_lib_bit_cast) return std::bit_cast(m) & std::bit_cast(o); -#else - return (int32_t)m & (int32_t)o; -#endif } inline int32_t operator&(const IROp o, const IROpMask m) -- cgit v1.2.3