     private let value: OpaquePointer
 
     /// Create an atomic object with `value`.
+    @_specialize(where T == Int)
+    @_specialize(where T == Bool)
+    @_specialize(where T == UInt64)
+    // in Swift 4.0 (fixed in 4.0.2), there was a crash that only allowed three specialisations otherwise the compiler would crash
+    // FIXME: Bring back when we require Swift >= 4.0.2
+    // @_specialize(where T == UInt)
+    // @_specialize(where T == Int64)
     public init(value: T) {
         self.value = T.atomic_create(value)
     }

    /// event will be ordered before or after this one.
    ///
    /// - Parameter value: The new value to set the object to.
    public func store(_ value: T) -> Void {
        T.atomic_store(self.value, value)
    }

    ///
    /// - Parameter rhs: The value to add to this object.
    /// - Returns: The previous value of this object, before the addition occurred.
    @_specialize(where T == Int)
    @_specialize(where T == Bool)
    @_specialize(where T == UInt64)
    // in Swift 4.0 (fixed in 4.0.2), there was a crash that only allowed three specialisations otherwise the compiler would crash
    // FIXME: Bring back when we require Swift >= 4.0.2
    // @_specialize(where T == UInt)
    // @_specialize(where T == Int64)
    public func add(_ rhs: T) -> T {
        return T.atomic_add(self.value, rhs)
    }
