Skip to content

Commit dfe2c00

Browse files
committed
[SIL] Added operator bool to ref.
1 parent 7e9f5e4 commit dfe2c00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/SIL/SILBitfield.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ template <typename BitfieldContainer> struct BitfieldRef {
181181
return ref;
182182
}
183183

184+
explicit operator bool() { return ref; }
185+
184186
// Stack-allocated state must be nested relative to other node bitfields.
185187
struct StackState {
186188
BitfieldRef &ref;

0 commit comments

Comments
 (0)