---
title: "CFSetAddValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfsetaddvalue(_:_:)"
---

# CFSetAddValue(_:_:)

Adds a value to a CFMutableSet object.

## Declaration

```swift
func CFSetAddValue(_ theSet: CFMutableSet!, _ value: UnsafeRawPointer!)
```

## Parameters

- `theSet`: The set to modify.
- `value`: A CFType object or a pointer value to add to theSet (or the value itself, if it fits into the size of a pointer). value is retained by theSet using the retain callback provided when theSet was created. If value is not of the type expected by the retain callback, the behavior is undefined. If value already exists in the collection, this function returns without doing anything.

## See Also

### CFMutableSet Miscellaneous Functions

- [CFSetCreateMutable(_:_:_:)](corefoundation/cfsetcreatemutable(_:_:_:).md)
- [CFSetCreateMutableCopy(_:_:_:)](corefoundation/cfsetcreatemutablecopy(_:_:_:).md)
- [CFSetRemoveAllValues(_:)](corefoundation/cfsetremoveallvalues(_:).md)
- [CFSetRemoveValue(_:_:)](corefoundation/cfsetremovevalue(_:_:).md)
- [CFSetReplaceValue(_:_:)](corefoundation/cfsetreplacevalue(_:_:).md)
- [CFSetSetValue(_:_:)](corefoundation/cfsetsetvalue(_:_:).md)
