Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #10495

Re: Cannot access protected from base class?

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: Cannot access protected from base class?
Date 2011-09-26 15:05 +1300
Message-ID <9ea4uuFd1oU1@mid.individual.net> (permalink)
References <316d56c3-c003-48c5-a75f-6f9128194d92@i4g2000vbc.googlegroups.com> <j5lrp1$f9n$1@dont-email.me> <6c3103ee-946b-4458-a1df-0c1054658650@m15g2000vbk.googlegroups.com> <j5m8ok$c8l$1@dont-email.me> <1a4dae1a-04b5-4fce-ac30-edb1694c3b94@hd1g2000vbb.googlegroups.com>

Show all headers | View raw


On 09/26/11 12:18 PM, Nephi Immortal wrote:
> On Sep 24, 10:56 pm, Richard Damon<news.x.richardda...@xoxy.net>
> wrote:
>> On 9/24/11 8:24 PM, Nephi Immortal wrote:
>>
>>> I understand, but I wonder if large number of base classes violate
>>> rule and needs to make sure if more memory is sufficient.
>>
>> A large number of base classes do not violate an inherent rule in C++.
>> You will likely end up with a large object, as it needs to store all the
>> base class members within it. It is possible that this may cause you to
>> run out of memory, it somewhat depends on how many copies of this object
>> are created.
>>
>> I do think it is a sign of a problematical design.- Hide quoted text -
>>
>> - Show quoted text -
>
> 	I am aware of design flaw, but careful design is better.  Large
> number of base classes into one derived class is the option to replace
> virtual functions because of the performance issue and template is not
> the option unless you want pointer to member function array.

What sort of a performance issue have you measured?

What makes templates unsuitable?  I don't understand the context of 
"unless you want pointer to member function array".

> 	If you think that it is design flaw, please demonstrate another
> option.

Exactly what problem are you trying to solve?

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-24 14:03 -0700
  Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 20:14 -0400
    Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-24 17:24 -0700
      Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-24 23:56 -0400
        Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-25 16:18 -0700
          Re: Cannot access protected from base class? Ian Collins <ian-news@hotmail.com> - 2011-09-26 15:05 +1300
          Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-25 22:38 -0400
            Re: Cannot access protected from base class? Nephi Immortal <immortalnephi@gmail.com> - 2011-09-25 20:42 -0700
              Re: Cannot access protected from base class? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-26 00:20 -0400

csiph-web