Skip to the content.

:balance_scale: Coding standards and regulatory requirements

C++ has traditionally occupied the areas where the cost of a mistake is measured not in lost money but in human lives: automotive electronics, medical devices, avionics, industrial automation, rail transport. In such projects the freedom of the language becomes a problem, so it is constrained — with a body of coding rules, mandatory checks, and a documented development process.

This article is an overview map of the territory, not a certification guide. Its goal is for you to understand what is meant when a job posting says “MISRA experience” or “ISO 26262 projects,” and to know where to look for the details.

There are a great many standards and requirements, and only the most prominent are collected below. There is no single “mandatory set”: every project uses its own subset depending on the industry, country, customer, and criticality class. It makes sense to dig into a specific standard when you actually meet it on your project, not just in case.

:warning: Requirements and deadlines change. Before making decisions, check against the current editions of the standards and with your company’s lawyers — this article is for orientation, not for legal conclusions.

:straight_ruler: Coding standards

They restrict the language to a subset with fewer ways to shoot yourself in the foot: no dynamic memory allocation after initialization, no exceptions, no implicit type conversions, and so on. Compliance is verified by static analyzers — such rule sets are not checked by hand.

:shield: Functional safety

These answer the question “what must happen so that the system does no harm in the event of a failure.” They regulate not so much the code as the process: requirements, traceability, testing, documentation, and qualification of the tools used.

The base standard in this area is IEC 61508, which introduces the Safety Integrity Levels SIL 1-4. The industry standards below are its adaptations:

:lock: Cybersecurity and the supply chain

A relatively new topic for the C++ world: regulators are shifting responsibility for vulnerabilities onto the software vendor.

:computer: What this means in practice

If you land on such a project, what changes is not so much the language as the environment around the code:

:question: Who actually needs this

Not everyone. If you write games, desktop applications, backends, or trading systems, in practice you most likely will not encounter these standards, and there is no point studying them specially.

The topic becomes mandatory if you go into automotive electronics, medical devices, aviation, space, rail transport, or industrial automation. For everyone else it is enough to know that these standards exist and what they are about — that is enough for an interview.

The exception is CRA and SBOM. They concern a far wider range of products than classic functional safety, so it is worth getting acquainted with them even as an “ordinary” developer whose products are sold in Europe.


To main page