B:BD[
2.426] → [
2.426:748]
static_assert(rational().num == 0);
static_assert(rational(1).num == 1);
static_assert(rational(1, 2).num == 1);
static_assert(rational(2, 4).num == 1);
static_assert(rational().den == 1);
static_assert(rational(1).den == 1);
static_assert(rational(1, 2).den == 2);
static_assert(rational(2, 4).den == 2);
using rat64 = rational<int64_t>;
static_assert(rat64().num == 0);
static_assert(rat64(1).num == 1);
static_assert(rat64(1, 2).num == 1);
static_assert(rat64(2, 4).num == 1);
static_assert(rat64().den == 1);
static_assert(rat64(1).den == 1);
static_assert(rat64(1, 2).den == 2);
static_assert(rat64(2, 4).den == 2);