On 3, Traffic Separation Schemes (TSS) will be making things look tidier (and safer) for many of the more organized flows. In a TSS, you have to drive on the right, and if you're crossing one, your heading (not your…
The first example won't compile in c++ (can't get a ptr to a non const from a const without something naughty like a const_cast) - that's not undefined behaviour is it?
The first example doesn't produce undefined behaviour as c++ - it just won't compile - you can't initialise that pointer to a non const int from a const int without doing something naughty like a const_cast.
On 3, Traffic Separation Schemes (TSS) will be making things look tidier (and safer) for many of the more organized flows. In a TSS, you have to drive on the right, and if you're crossing one, your heading (not your…
The first example won't compile in c++ (can't get a ptr to a non const from a const without something naughty like a const_cast) - that's not undefined behaviour is it?
The first example doesn't produce undefined behaviour as c++ - it just won't compile - you can't initialise that pointer to a non const int from a const int without doing something naughty like a const_cast.