Skip to content

Commit 715f915

Browse files
committed
use bit_cast
1 parent 901f660 commit 715f915

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

source/slang/slang-ir.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
// similar in spirit to LLVM (but much simpler).
88
//
99

10-
#if defined(__cpp_lib_bit_cast)
11-
#include <bit>
12-
#endif
1310
#include "../compiler-core/slang-source-loc.h"
1411
#include "../compiler-core/slang-source-map.h"
1512
#include "../core/slang-basic.h"
1613
#include "../core/slang-memory-arena.h"
1714
#include "slang-container-pool.h"
1815
#include "slang-type-system-shared.h"
1916

17+
#include <bit>
2018
#include <functional>
2119

2220
namespace Slang
@@ -105,11 +103,7 @@ enum IRMemoryOrder
105103

106104
inline int32_t operator&(const IROpMask m, const IROp o)
107105
{
108-
#if defined(__cpp_lib_bit_cast)
109106
return std::bit_cast<int32_t>(m) & std::bit_cast<int32_t>(o);
110-
#else
111-
return (int32_t)m & (int32_t)o;
112-
#endif
113107
}
114108

115109
inline int32_t operator&(const IROp o, const IROpMask m)

0 commit comments

Comments
 (0)