---
title: Operator Declarations
framework: swift
role: article
role_heading: Article
path: swift/operator-declarations
---

# Operator Declarations

Work with prefix, postfix, and infix operators.

## Overview

Overview The tables below list the operators declared by the Swift standard library. For more information about operation declarations, see Operator Declaration in The Swift Programming Language. The prefix operators are as follows:  |   |   |   |   |   |   |   |  The postfix operators are as follows:  |   |  The infix operators are grouped below by precedence group in decreasing order of precedence. If you declare a new operator without specifying a precedence group, it is a member of the DefaultPrecedence precedence group. DefaultPrecedence has no associativity and a precedence immediately higher than TernaryPrecedence. The BitwiseShiftPrecedence group, which isn’t associative, contains the following infix operators:  |   |   |   |   |  The MultiplicationPrecedence group, which is left associative, contains the following infix operators:  |   |   |   |   |   |  The AdditionPrecedence group, which is left associative, contains the following infix operators:  |   |   |   |   |   |   |  The RangeFormationPrecedence group, which isn’t associative, contains the following infix operators:  |   |   |  The CastingPrecedence group, which is left associative, contains the following infix operators:  |   |   |  The NilCoalescingPrecedence group, which is right associative, contains the following infix operators:  |   |  The ComparisonPrecedence group, which isn’t associative, contains the following infix operators:  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  The LogicalConjunctionPrecedence group, which is left associative, contains the following infix operators:  |   |   |  The LogicalDisjunctionPrecedence group, which is left associative, contains the following infix operators:  |   |   |   |  The TernaryPrecedence group, which is right associative, contains the following infix operators:  |   |  The AssignmentPrecedence group, which is right associative, contain the following infix operators:  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |

## See Also

### Programming Tasks

- [Input and Output](swift/input-and-output.md)
- [Debugging and Reflection](swift/debugging-and-reflection.md)
- [Macros](swift/macros.md)
- [Concurrency](swift/concurrency.md)
- [Key-Path Expressions](swift/key-path-expressions.md)
- [Manual Memory Management](swift/manual-memory-management.md)
- [Type Casting and Existential Types](swift/type-casting-and-existential-types.md)
- [C Interoperability](swift/c-interoperability.md)
