Format of compiler generated derived destructor when base has 'virtual ~base() throw():"

Discussion in 'C++' started by qazmlp, Apr 8, 2005.

  1. qazmlp

    qazmlp Guest

    I have a class like this:
    class base
    {
    public:
    virtual ~base() throw();
    // Other members
    };


    Now, if I write a class like this:
    class derived:public base
    {
    // Other members
    };

    What will/should be the format of the compiler-generated destructor for derived?

    Will it be this:
    - ~derived(); or
    - virtual ~derived(); or
    - virtual ~derived() throw();
    qazmlp, Apr 8, 2005
    #1
    1. Advertising

  2. qazmlp

    qazmlp Guest

    Could anybody reply to this post? I would like to know what exactly
    'C++ standard' mentions about this.

    Thanks!

    > (qazmlp) wrote in message
    > news:<>...
    > I have a class like this:
    > class base
    > {
    > public:
    > virtual ~base() throw();
    > // Other members
    > };
    >
    >
    > Now, if I write a class like this:
    > class derived:public base
    > {
    > // Other members
    > };
    >
    > What will/should be the format of the compiler-generated destructor for derived?
    >
    > Will it be this:
    > - ~derived(); or
    > - virtual ~derived(); or
    > - virtual ~derived() throw();
    qazmlp, Apr 10, 2005
    #2
    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. Chunhui Han
    Replies:
    2
    Views:
    492
  2. qazmlp
    Replies:
    7
    Views:
    483
    Howard
    Jul 27, 2004
  3. arun
    Replies:
    2
    Views:
    533
    benben
    Jun 13, 2006
  4. Replies:
    1
    Views:
    385
    myork
    May 23, 2007
  5. Replies:
    1
    Views:
    373
    Victor Bazarov
    May 23, 2007
Loading...

Share This Page