[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    C++ question
From:       Angus Leeming <leeming () lyx ! org>
Date:       2003-06-11 18:36:55
[Download RAW message or body]

Suppose I have classes

class Base {
public:
        Base()
                : cache_(0)
        {}
        // cache is not copied.
        Base(Base const &)
                : cache_(0)
        {}
        Base & operator=(Base const &)
        {
                return *this;
        }

private:
        mutable int cache_;
};


class Derived : public Base {
        ???
};

The question is, do I need to define explicit copy c-tor and operator= for 
Derived to ensure that Base's copy c-tor, operator= is used?

-- 
Angus

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic