Please, if you downvote or close this posting, which is what usually happens to my postings, I would appreciate it if you could tell me precisely why. Simply indicating that it doesn’t show sufficient research or using any of the other stock reasons that are often casually given does not help me improve my postings 🙁
I know the question about what an “object” is has been asked before, but I haven’t seen my particular concern addressed (maybe I just missed it). My references are to the draft C17 standard and the draft C++11 and C++17 standards.
C17 – 3.15
“Object – region of storage in the execution environment, the contents of which can represent values.”
C++11 – 1.8 The C++ object model [intro.object]
“An object is a region of storage.”
C++17 – 1.8 The C++ object model [intro.object]
The statement above from C++11 is no longer present in this version of the standard. It is merely stated that an object “occupies” a region of storage.
So, my issue is with the C17, C++11, and earlier versions’ assertions that an object IS a “region of storage”. Since storage is a physical medium, common terms like “constructing an object”, “destroying an object”, “allocating an object”, etc. would seemingly have to mean that a region of the physical medium itself is somehow getting created and destroyed.
Obviously, that’s not what’s happening. So, I’m wondering why the definition of an object being “a region of storage” rather than “occupying a region of storage” persisted in the C++ standards until C++17 and still persists in the C standards (unless C23 has changed it).