A type that can be initialized with a floating-point literal.
- Xcode 8.0+
- Swift Standard Library
The standard library floating-point types—
Float80 where available—all conform to the
Expressible protocol. You can initialize a variable or constant of any of these types by assigning a floating-point literal.
Conforming to ExpressibleByFloatLiteral
Expressible conformance to your custom type, implement the required initializer.