---
title: "==(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/anyindex/==(_:_:)"
---

# ==(_:_:)

Returns a Boolean value indicating whether two indices wrap equal underlying indices.

## Declaration

```swift
static func == (lhs: AnyIndex, rhs: AnyIndex) -> Bool
```

## Parameters

- `lhs`: An index to compare.
- `rhs`: Another index to compare.

## Discussion

Discussion The types of the two underlying indices must be identical.
