tedzhou wrote:
> On May 24, 5:19 pm, Ian Collins <ian-n...@hotmail.com> wrote:
>> James Kanze wrote:
>>> On May 24, 9:47 am, Ian Collins <ian-n...@hotmail.com> wrote:
>>> [...]
>>>> I was going to suggest that technique, but decided against it as the OP
>>>> wanted to delegate members of std::set. I wouldn't recommend deriving
>>>> from a standard container.
>>> Not even privately? I have no problems with private inheritance
>>> from a standard container; private inheritance is part of the
>>> implementation.
>> Yes, you're right, I overlooked private inheritance.
>
> Private inheritance is not suggested on standard container either.
> Because the standard containers are not designed for inheritance at
> all.
Not necessarily. Several of the standard adapter classes
(std:

riority_queue for example) have protected members, which implies
that they were designed to be inherited from.