3 ms·
> And the author's solution is to replace that one line with this: Which does not do what the author wants it to do. volatile auto device_registers_ptr =
by kbwt 8y ago
> And the author's solution is to replace that one line with this:
Which does not do what the author wants it to do.
volatile auto device_registers_ptr = reinterpret_cast<DeviceSetup*>(DeviceControlAddress);
'decltype(device_registers_ptr)' yields 'DeviceSetup* volatile', when clearly 'DeviceSetup volatile*' was intended. Insert some witty rant about programmers being attracted to complexity here.