Performs addition with a flag for overflow.Documentation Index
Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
Use this file to discover all available pages before exploring further.
Performs addition with a flag for overflow.Documentation Index
Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
Use this file to discover all available pages before exploring further.
pub trait OverflowingAdd
use core::num::traits::OverflowingAdd;
let (result, is_overflow) = 1_u8.overflowing_add(255_u8);
assert!(result == 0);
assert!(is_overflow);
fn overflowing_add(self: T, v: T) -> (T, bool)
Was this page helpful?