Files
swift-mirror/test/Interop/Cxx/stdlib/overlay/Inputs/convertible-to-bool.h
2024-10-17 13:51:58 +01:00

27 lines
395 B
C++

struct BoolBox {
bool value;
operator bool() const { return value; }
};
struct NonConstBoolBox {
bool value;
operator bool() { return value; }
};
struct DualOverloadBoolBox {
bool value;
operator bool() const { return value; }
operator bool() { return value; }
};
struct ExplicitBoolBox {
private:
bool value;
public:
explicit operator bool() const { return value; }
};