I use C++ for embedded programming.
Supposing I have to implement a strictly-defined (i.e. byte-by-byte) class type, can I add a constructor and some other non-virtual methods to it without objects of that type changing at the byte level? That is, can I assume that no additional data will be added to it?
I assume that RTTI is turned off.
I would like to be sure wheteher C++ standard defines this.
Yes, if you only add constructors and/or non-virtual methods you will not change the size or the layout of the class, because the original class and the new class will be layout compatible (9.2 Class members [class.mem] #17), but only if they are standard-layout classes.
The standard-layout classes are defines as: