includes/std: Added std::mem::reached() for use with while-sized arrays

This commit is contained in:
WerWolv
2024-07-10 21:32:55 +02:00
parent 2f795fc23c
commit bced518508

View File

@@ -46,6 +46,15 @@ namespace auto std::mem {
return $ >= (std::mem::base_address() + std::mem::size()); return $ >= (std::mem::base_address() + std::mem::size());
}; };
/**
Function that returns true if the cursor position is at or beyond the given address
@param address The address to compare against
@return True if the cursor is at or beyond the given address
*/
fn reached(u128 address) {
return $ >= address;
};
/** /**
Aligns the given value to the given alignment Aligns the given value to the given alignment
@param alignment The alignment to align to @param alignment The alignment to align to