HashMap.get

get with default value it infers @safe, @nogc from user data: do not return ptr and do not thow

  1. V get(K k, T defaultValue)
    struct HashMap(K, V, Allocator = Mallocator, bool GCRangesAllowed = true)
    const
    V
    get
    (
    T
    )
  2. V get(K k, T defaultValue)

Return Value

Type: V

value from hash, or defaultValue if key not found (see also getOrAdd). defaultValue can be callable.

Meta