3 ms·
> There is no compiler enforced safe mode It's still early days, but Clang can check some lifetimes, using the [[clang::lifetimebound]] attribute [1]. You can
by monax 1y ago
> There is no compiler enforced safe mode
It's still early days, but Clang can check some lifetimes, using the [[clang::lifetimebound]] attribute [1]. You can also restrict unsafe pointer usage [2] outside designated blocks of code—somewhat like Rust’s unsafe keyword.
[1] https://clang.llvm.org/docs/AttributeReference.html#id8 https://clang.llvm.org/docs/AttributeReference.html#id8
[2] https://clang.llvm.org/docs/SafeBuffers.html#buffer-operations-should-never-be-performed-over-raw-pointers https://clang.llvm.org/docs/SafeBuffers.html#buffer-operatio...