Constructors
Synopses
Declared in <mp‐units/safe_int.h>
Default constructor
safe_int() = default;
Construct from safe_int
template<std::integral U>
requires (!std::is_same_v<T, U>) && std::is_constructible_v<T, U>
constexpr
explicit(!detail::is_value_preserving_int_v<U, T>)
safe_int(safe_int<U, ErrorPolicy> const& other);
Construct from U
template<typename U>
requires (!treat_as_floating_point<std::remove_cvref_t<U>>) && std::is_constructible_v<T, U>
constexpr
explicit(!detail::is_value_preserving_v<std::remove_cvref_t<U>, T>)
safe_int(U const& v);
Created with MrDocs