Type Aliases

  • typealias Any = protocol<>

The protocol to which all types implicitly conform

The protocol to which all class types implicitly conform.

When used as a concrete type, all known @objc class methods and properties are available, as implicitly-unwrapped-optional methods and properties respectively, on each instance of AnyClass. For example:

  • class C {
  •   @objc class var cValue: Int { return 42 }
  • }
  •  
  • // If x has an @objc cValue: Int, return its value. 
  • // Otherwise, return nil.
  • func getCValue(x: AnyClass) -> Int? {
  •   return **x.cValue**
  • }

See also: AnyObject

The default type for an otherwise-unconstrained boolean literal

The C '_Bool' and C++ 'bool' type.

The C 'char' type.

This will be the same as either CSignedChar (in the common case) or CUnsignedChar, depending on the platform.

The C++11 'char16_t' type, which has UTF-16 encoding.

The C++11 'char32_t' type, which has UTF-32 encoding.

The C 'double' type.

The C 'float' type.

The C 'int' type.

The C 'long' type.

The C 'long long' type.

The C 'short' type.

The C 'signed char' type.

The C 'unsigned char' type.

The C 'unsigned int' type.

The C 'unsigned long' type.

The C 'unsigned long long' type.

The C 'unsigned short' type.

The C++ 'wchar_t' type.

The default type for an otherwise-unconstrained unicode extended grapheme cluster literal

A 32-bit floating point type

A 64-bit floating point type

The default type for an otherwise-unconstrained floating point literal

The largest native signed integer type

The default type for an otherwise-unconstrained integer literal

The default type for an otherwise-unconstrained string literal

The largest native unsigned integer type

An unsigned integer type that occupies one machine word

The default type for an otherwise-unconstrained unicode scalar literal

The empty tuple type.

This is the default return type of functions for which no explicit return type is specified.

A signed integer type that occupies one machine word