mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] pick off public non-protocol docs
197 undocumented public non-operator APIs remain in core Swift SVN r22242
This commit is contained in:
@@ -38,8 +38,10 @@ public func maxElement<
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the first index where `value` appears in `domain` or `nil` if
|
/// Returns the first index where `value` appears in `domain` or `nil` if
|
||||||
// `domain` doesn't contain `value`. O(countElements(domain))
|
/// `value` is not found.
|
||||||
|
///
|
||||||
|
/// Complexity: O(\ `countElements(domain)`\ )
|
||||||
public func find<
|
public func find<
|
||||||
C: CollectionType where C.Generator.Element : Equatable
|
C: CollectionType where C.Generator.Element : Equatable
|
||||||
>(domain: C, value: C.Generator.Element) -> C.Index? {
|
>(domain: C, value: C.Generator.Element) -> C.Index? {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
// Bool Datatype and Supporting Operators
|
// Bool Datatype and Supporting Operators
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// Bool is the standard way to reason about truth values.
|
/// A value type whose instances are either `true` or `false`.
|
||||||
public struct Bool {
|
public struct Bool {
|
||||||
var value: Builtin.Int1
|
var value: Builtin.Int1
|
||||||
|
|
||||||
@@ -45,9 +45,10 @@ extension Bool : BooleanType {
|
|||||||
/// Identical to `self`.
|
/// Identical to `self`.
|
||||||
@transparent public var boolValue: Bool { return self }
|
@transparent public var boolValue: Bool { return self }
|
||||||
|
|
||||||
// Bool can be constructed from BooleanType
|
/// Construct an instance representing the same logical value as
|
||||||
public init<T: BooleanType>(_ v: T) {
|
/// `value`
|
||||||
self = v.boolValue
|
public init<T: BooleanType>(_ value: T) {
|
||||||
|
self = value.boolValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -390,7 +390,10 @@ public struct AutoreleasingUnsafeMutablePointer<T /* TODO : class */>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow read-only subscripting through an AutoreleasingUnsafeMutablePointer.t
|
/// Access the `i`\ th element of the raw array pointed to by
|
||||||
|
/// `self`.
|
||||||
|
///
|
||||||
|
/// Requires: `self != nil`
|
||||||
public subscript(i: Int) -> T {
|
public subscript(i: Int) -> T {
|
||||||
@transparent
|
@transparent
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public typealias CBool = Bool
|
|||||||
public struct COpaquePointer : Equatable, Hashable, NilLiteralConvertible {
|
public struct COpaquePointer : Equatable, Hashable, NilLiteralConvertible {
|
||||||
var value: Builtin.RawPointer
|
var value: Builtin.RawPointer
|
||||||
|
|
||||||
|
/// Construct a `nil` instance.
|
||||||
@transparent
|
@transparent
|
||||||
public init() {
|
public init() {
|
||||||
value = _nilRawPointer
|
value = _nilRawPointer
|
||||||
|
|||||||
Reference in New Issue
Block a user