---
title: "CFSetSetValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfsetsetvalue(_:_:)"
---

# CFSetSetValue(_:_:)

Sets a value in a CFMutableSet object.

## Declaration

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

## Parameters

- `theSet`: The set to modify.
- `value`: The value to be set in theSet. If this value already exists in theSet, it is replaced. You may pass the value itself instead of a pointer to it if the value is pointer-size or less. If theSet is fixed-size and setting the value would increase its size beyond its capacity, the behavior is undefined.

## Discussion

Discussion Depending on the implementation of the equal callback specified when creating theSet, the value that is replaced by value may not have the same pointer equality.

## See Also

### CFMutableSet Miscellaneous Functions

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