3 ms·
Is there a document that describes roughly how to do the conversion? How are things like pointer arithmetic handled?
by muizelaar 7y ago
Is there a document that describes roughly how to do the conversion? How are things like pointer arithmetic handled?
- safercplusplus 7y agoUnfortunately, documentation [1] is still kind of lacking. Like Rust (and arguably modern C++ conventions?), the safe subset doesn't support pointer arithmetic directly. You would have to convert the pointer to an iterator (and its target to an appropriate container). Auto-conversion of code that uses pointer arithmetic is challenging, but has been demonstrated to be solvable in the general case [2]. [1] https://github.com/duneroadrunner/SaferCPlusPlus#getting-started-on-safening-existing-code https://github.com/duneroadrunner/SaferCPlusPlus#getting-sta... [2] https://github.com/duneroadrunner/SaferCPlusPlus-AutoTranslation https://github.com/duneroadrunner/SaferCPlusPlus-AutoTransla...