I would like to hear different opinions on how to use C ++ safely in mission-critical real-time applications.
More precisely, it is possible to create some macros / templates / class library for safe data processing (compaction for overflow, zerodivides creates infinity values ββor division is possible only for special "non-zero" data types), arrays with associated validation and foreach loops, safe smart controllers (e.g. boost shared_ptr, for example) and even a secure multi-threaded / distributed model (message passing and lightweight processes like those defined in the Erlang language).
Then we prohibit some dangerous c / C ++ constructs, such as raw pointers, some raw types, our own βnewβ operator, and native c / C ++ arrays (for the programmer, but not for the library, of course). Ideally, we should create a special preprocessor / controller, at least we should have some formal verification procedure that can be applied to sources using some kind of tool or manual for someone.
So my questions are:
1) Are there existing libraries / projects that use such an idea? (Embedded C ++ is apparently not desirable)?
2) Is this a good idea or not? Or can it be useful only for prototyping some other language? Or is it completely unsuitable?
3) Any other thoughts (or links) on this subject are also welcome.
Sorry if this question is not really a question, offtopic, duplicate, etc. but I did not find a more suitable place to ask him.
c ++ embedded real-time
user396672
source share