[stdlib] pick off public non-protocol docs

197 undocumented public non-operator APIs remain in core

Swift SVN r22242
This commit is contained in:
Dave Abrahams
2014-09-23 23:36:00 +00:00
parent 795799b0d2
commit 824e78dd89
4 changed files with 14 additions and 7 deletions

View File

@@ -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? {

View File

@@ -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
} }
} }

View File

@@ -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 {

View File

@@ -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