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. Advertisements

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:
    434
    Howard
    Apr 5, 2004
  2. Replies:
    1
    Views:
    1,494
    Jonathan Mcdougall
    Dec 24, 2004
  3. Replies:
    0
    Views:
    624
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,823
    Smokey Grindel
    Dec 2, 2006
  5. Replies:
    13
    Views:
    679
    Dave Thompson
    Nov 15, 2004
  6. lovecreatesbeauty
    Replies:
    1
    Views:
    1,421
    Ian Collins
    May 9, 2006
  7. Alf P. Steinbach
    Replies:
    6
    Views:
    808
    John Carson
    Sep 3, 2005
  8. Replies:
    3
    Views:
    978
Loading...