Why can't a base class subobject be copied to and from an array of char

F

Fraser Ross

At 3.9/2 in the standard I can understand that a base class subobject
might have size 0 but is that the reason for it being an exception? If
it is then why does the standard not make this clearer? Is there any
other reason? A reference to a base class can be obtained with
static_cast. I don't see a problem with getting a pointer or reference
to a base class.

Fraser.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top