Due to the high demand for C++ Standard Library qualification, we are actively developing tests, test specifications, and requirements for the C++ standard library in SuperGuard. Everyone knows that C++ is based on C and preserves its high speed and predictable performance. It’s one of the reasons why C++ is so widely used in embedded applications. However, the way in which C++ views the standard library differs significantly from that in C.

Both languages include a standard library that is defined alongside the programming language. If you use the C language without accessing the library, which many embedded application developers do, you only need to check that the compiler implements the language correctly. But if you are a C++ developer, not using the standard library is like writing code with both hands tied behind your back.

That’s because the C++ language includes a wide range of compiler-implemented abstractions, such as templates, constructors, and destructors, that make it easier to avoid the common pitfalls of C. Using these abstractions, the C++ library provides advanced features such as arrays, iterators, and sequences that improve type and memory safety. These ingredients make switching from C to C++ worthwhile, especially in high-performance safety-critical applications.

Such applications are becoming increasingly ubiquitous because affordable processing power and high-performance sensors are now widely available, together with advanced software modules for 2D and 3D data processing and sensor fusion. These building blocks, which are simply not available in C, raise the level of application development and make C++ more productive.

But there is a price to pay. If you want to use C++ in a safety-critical project, you must ensure it can be used safely. In a C-based project, you can skip the standard library and only need to qualify the compiler. For C++, skipping C++ library qualification is not an option. The library must be scrutinized as rigorously as the application code itself. The essential ingredient to achieve that is a requirements-based test suite with full traceability between the C++ library specification and the test results – which is why we have extended SuperGuard with C++ library tests and requirements.

C++ is not simply an extension of the C language. The C++ compiler and its standard library are two sides of the same coin, much more than is the case for C. To use it safely, you need to qualify both.

Dr. Marcel Beemster, CTO

SuperGuard for C++


Subscribe to our monthly blog!