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

Discussion in 'C++' started by Fraser Ross, Apr 8, 2009.

  1. Fraser Ross

    Fraser Ross Guest

    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.
    Fraser Ross, Apr 8, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave

    const base subobject

    Dave, Apr 5, 2004, in forum: C++
    Replies:
    1
    Views:
    323
    Howard
    Apr 5, 2004
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,804
    Smokey Grindel
    Dec 2, 2006
  3. lovecreatesbeauty
    Replies:
    1
    Views:
    1,034
    Ian Collins
    May 9, 2006
  4. shinedance
    Replies:
    0
    Views:
    349
    shinedance
    Oct 10, 2011
  5. Replies:
    1
    Views:
    100
Loading...

Share This Page