---
title: "CFBinaryHeapContainsValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbinaryheapcontainsvalue(_:_:)"
---

# CFBinaryHeapContainsValue(_:_:)

Returns whether a given value is in a binary heap.

## Declaration

```swift
func CFBinaryHeapContainsValue(_ heap: CFBinaryHeap!, _ value: UnsafeRawPointer!) -> Bool
```

## Parameters

- `heap`: The binary heap to search.
- `value`: The value for which to find matches in the binary heap. The compare callback provided in the doc://com.apple.corefoundation/documentation/CoreFoundation/CFBinaryHeapCallBacks structure when the binary heap was created is used to compare values. If value, or any of the values in the binary heap, are not understood by the compare callback, the behavior is undefined.

## Return Value

Return Value true if value is a member of heap, false otherwise.

## See Also

### CFBinaryHeap Miscellaneous Functions

- [CFBinaryHeapAddValue(_:_:)](corefoundation/cfbinaryheapaddvalue(_:_:).md)
- [CFBinaryHeapApplyFunction(_:_:_:)](corefoundation/cfbinaryheapapplyfunction(_:_:_:).md)
- [CFBinaryHeapCreate(_:_:_:_:)](corefoundation/cfbinaryheapcreate(_:_:_:_:).md)
- [CFBinaryHeapCreateCopy(_:_:_:)](corefoundation/cfbinaryheapcreatecopy(_:_:_:).md)
- [CFBinaryHeapGetCount(_:)](corefoundation/cfbinaryheapgetcount(_:).md)
- [CFBinaryHeapGetCountOfValue(_:_:)](corefoundation/cfbinaryheapgetcountofvalue(_:_:).md)
- [CFBinaryHeapGetMinimum(_:)](corefoundation/cfbinaryheapgetminimum(_:).md)
- [CFBinaryHeapGetMinimumIfPresent(_:_:)](corefoundation/cfbinaryheapgetminimumifpresent(_:_:).md)
- [CFBinaryHeapGetTypeID()](corefoundation/cfbinaryheapgettypeid().md)
- [CFBinaryHeapGetValues(_:_:)](corefoundation/cfbinaryheapgetvalues(_:_:).md)
- [CFBinaryHeapRemoveAllValues(_:)](corefoundation/cfbinaryheapremoveallvalues(_:).md)
- [CFBinaryHeapRemoveMinimumValue(_:)](corefoundation/cfbinaryheapremoveminimumvalue(_:).md)
