     
     /// Compare and set Object with barrier.
     @_transparent
-    public func compareSet(oldVal: Atomic, _ newVal: Atomic) -> Bool {
+    public mutating func compareSet(oldVal: Atomic, _ newVal: Atomic) -> Bool {
         return compareSet(oldVal.base, newVal.base)
     }
 }

    }
}

extension Atomic {
    
    @_transparent
    private func compareSet(oldVal: AtomicBase<Instance>, _ newVal: AtomicBase<Instance>) -> Bool {
        let _oldVal = Unmanaged.passUnretained(oldVal)
        let _newVal = Unmanaged.passRetained(newVal)
        @inline(__always)


private final class AtomicBase<Instance> {
    
    let value: Instance
    
    init(value: Instance) {
        self.value = value
    }
}

public struct Atomic<Instance> {
    
    private var base: AtomicBase<Instance>
    
