/
auroraos
/
mirror_SafeInt
Обзор
Документация
Войти
/
auroraos
/
mirror_SafeInt
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
master
Test/SafeIntTestVS17/Scratch/Scratch.cpp
22 строки
443 B
David LeBlanc
Fix UB in align, and an actual bug (#80)
10 май 2026, 10:32
Не верифицирован
10 май 2026, 10:32
e4fb153
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <iostream> #define SAFEINT_USE_INTRINSICS 0 #include "../../../SafeInt.hpp" /* Use this to check specific scenarios */ #include <string> int main(int argc, char** argv) { std::uint32_t lhs = 1; // U = std::uint32_t SafeInt<std::uint64_t> bits = 40; // T = std::uint64_t auto foo = lhs << bits; return 0; }