Feature: Software and tools
Examining the challenges posed by the <chrono> and <tuple> C++ headers in safety-critical systems
By Max Blankestijn, Software Engineer, Solid Sands C
++ is a popular programming language due to its performance, fl exibility and low-level control. However, when it comes to handling complex data
structures, developers oſt en face a series of challenges that can complicate safety- critical applications, such as in automotive. Take <tuple>, for instance. T is C++
header provides a powerful and versatile data structure that allows developers to
group diff erent types of data into a single entity without the overhead of defi ning a custom class. In automotive systems, for example, this can be invaluable – whether representing sensor readings, vehicle states, or confi guration parameters for control systems. Likewise, the <chrono> header from the
C++ standard library provides applications with various types to abstract clocks, points in time and operations. It helps developers reason about time in a clean, type-safe way,
16 September 2025
www.electronicsworld.co.uk
essential for systems with tight timing constraints. However, there are dangers lurking
beneath some of its convenient features. T e C++ standard has some simple yet strong mathematical statements that do not always hold in practice with the limited and variable precision of fl oating- point numbers. Both headers off er powerful
abstractions, namely time manipulation via <chrono> and fl exible, type-safe
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44