Checked.this

Construct from a decimal string. The conversion follows the same rules as std.conv.to converting a string to the wrapped T type.

  1. this(U rhs)
  2. this(Range str)
    struct Checked(T, Hook = Abort)
    this
    (
    Range
    )
    (
    Range str
    )
    if (
    is(T == Checked!(U, H),
    U
    H
    )
    )

Parameters

str Range

an input range of characters

Examples

std.conv.to can convert a string to a Checked!T:

import std.conv : to;

const a = to!long("1234");
const b = to!(Checked!long)("1234");
assert(a == b);

Meta