range

Create an OptionRange from an Option type.

The range shall be empty when the option has no value, and it shall have one item when the option has a value.

  1. OptionRange!T range(Option!T optionalValue)
  2. OptionRange!(const(T)) range(const(Option!T) optionalValue)
  3. OptionRange!(immutable(T)) range(immutable(Option!T) optionalValue)
    @nogc @trusted pure nothrow
    OptionRange!(immutable(T))
    range
    (
    T
    )
    (
    immutable(Option!T) optionalValue
    )

Parameters

optionalValue
Type: immutable(Option!T)

An optional value.

Return Value

Type: OptionRange!(immutable(T))

A range of 0 or 1 values.

Meta