Raw Value Types

The Swift doc says:

Raw values can be strings, characters, or any of the integer or floating-point number types.

However, this is not the complete set of types that can serve as enumeration raw values. The fact is raw values can be any *LiteralConvertible types. For example:

extension CGSize: StringLiteralConvertible {
    public init(stringLiteral value: String) {
        self = CGSizeFromString(value)
    }

    public init(extendedGraphemeClusterLiteral value: String) {
        self = CGSizeFromString(value)
    }

    public init(unicodeScalarLiteral value: String) {
        self = CGSizeFromString(value)
    }
}

enum Device: CGSize {
    case iPhone4 = "{320, 480}"
    case iPhone5 = "{320, 568}"
    case iPhone6 = "{375, 667}"
    case iPhone6Plus = "{414, 736}"
}

let device = Device(rawValue: CGSize(width: 320, height: 480))
device?.rawValue