---
title: ExpressibleByBooleanLiteral
framework: swift
role: symbol
role_heading: Protocol
path: swift/expressiblebybooleanliteral
---

# ExpressibleByBooleanLiteral

A type that can be initialized with the Boolean literals true and false.

## Declaration

```swift
protocol ExpressibleByBooleanLiteral
```

## Overview

Overview Bool, DarwinBoolean, ObjCBool, and WindowsBool are treated as Boolean values. Expanding this set to include types that represent more than simple Boolean values is discouraged. To add ExpressibleByBooleanLiteral conformance to your custom type, implement the init(booleanLiteral:) initializer that creates an instance of your type with the given Boolean value.

## Topics

### Associated Types

- [BooleanLiteralType](swift/expressiblebybooleanliteral/booleanliteraltype.md)

### Initializers

- [init(booleanLiteral:)](swift/expressiblebybooleanliteral/init(booleanliteral:).md)

## Relationships

### Conforming Types

- [Bool](swift/bool.md)

## See Also

### Value Literals

- [ExpressibleByIntegerLiteral](swift/expressiblebyintegerliteral.md)
- [ExpressibleByFloatLiteral](swift/expressiblebyfloatliteral.md)
- [ExpressibleByNilLiteral](swift/expressiblebynilliteral.md)
- [StaticBigInt](swift/staticbigint.md)
