cppstl/std_pair

Types

CppPair[F; S] {.importcpp: "std::pair <\'0,\'1>".} = object

Procs

proc `!=`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
proc `$`[F, S](val: CppPair[F, S]): string
proc `<=`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
  1. !(rhs < lhs)
proc `<`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
If lhs.first<rhs.first, returns true. Otherwise, if rhs.first<lhs.first, returns false. Otherwise, if lhs.second<rhs.second, returns true. Otherwise, returns false.
proc `==`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
proc `>=`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
  1. !(lhs < rhs)
proc `>`[T1, T2](lhs, rhs: CppPair[T1, T2]): bool
  1. rhs < lhs
proc first=[T1, T2](this: var CppPair[T1, T2]; val: T1) {.
    importcpp: "#.first = #", header: "<utility>", ...raises: [], tags: [].}
proc first[T1, T2](this: CppPair[T1, T2]): T1 {.importcpp: "#.first",
    header: "<utility>", ...raises: [], tags: [].}
proc first[T1, T2](this: var CppPair[T1, T2]): var T1 {.importcpp: "#.first",
    header: "<utility>", ...raises: [], tags: [].}
proc get[T1, T2](n: static int; p: CppPair[T1, T2]): auto
proc get[T1, T2](T: typedesc; p: CppPair[T1, T2]): auto
proc initCppPair[T1, T2](): CppPair[T1, T2] {.constructor, importcpp: "\'0(@)",
    header: "<utility>", ...raises: [], tags: [].}
proc initCppPair[T1, T2](p: CppPair[T1, T2]): CppPair[T1, T2] {.constructor,
    importcpp: "\'0(@)", header: "<utility>", ...raises: [], tags: [].}
proc initCppPair[T1, T2](x: T1; y: T2): CppPair[T1, T2] {.constructor,
    importcpp: "\'0(@)", header: "<utility>", ...raises: [], tags: [].}
proc makePair[F, S](a: F; b: S): CppPair[F, S] {.importcpp: "std::make_pair(@)",
    header: "<utility>", ...raises: [], tags: [].}
proc makePair[F, S](t: tuple[first: F, second: S]): CppPair[F, S]
proc second=[T1, T2](this: var CppPair[T1, T2]; val: T2) {.
    importcpp: "#.second = #", header: "<utility>", ...raises: [], tags: [].}
proc second[T1, T2](this: CppPair[T1, T2]): T2 {.importcpp: "#.second",
    header: "<utility>", ...raises: [], tags: [].}
proc second[T1, T2](this: var CppPair[T1, T2]): var T2 {.importcpp: "#.second",
    header: "<utility>", ...raises: [], tags: [].}
proc swap[T1, T2](this, other: var CppPair[T1, T2]) {.importcpp: "#.swap(@)",
    header: "<utility>", ...raises: [], tags: [].}
proc toTuple[F, S](val: CppPair[F, S]): tuple[first: F, second: S]
converts a CppPair into a Nim's tuple