Topic: Fwd: C++ wishlist


Author: Paul Elliott <pelliott@io.com>
Date: Sat, 16 Sep 2006 18:37:51 CST
Raw View
From: pelliott@hrnowl.io.com (Paul Elliott)
Newsgroups: comp.std.c++
Subject: Re: C++ wishlist

On 2004-09-03, Simon Richter <richtesi@informatik.tu-muenchen.de> wrote:
> Hi,
>
> some time ago it has been asked in this group whether anyone had large-scale
> wishes. Here are mine

I think the following needs to be added:

Some kind of way to "cut off" the virtualness of a base class with
respect to further derived classes.

For example:


class A : virtual base {...};
class B : virtual base {...};


class myclass : public A, public B {...};

class derived: public myclass {...};


There needs to be someway of saying that although the virtualness of
base was necessary to construct myclass, the writers of classes like
derived do not need to know how myclass was constructed (with respect
to base).  There needs to be someway of saying that base is NOT a
virtual base class of derived. And that writers of "derived" like
classes do not need to provide a ctor initializer for base, but that
the ctor initializer of myclass (for base) should be used instead.

I don't know possibly a notvirtual keyword?

class myclass : public A, public B, notvirtual base {...};

I don't insist on any particular syntax, but someway
of providing this functionality.

--
Paul Elliott                       1(512)837-1096
pelliott@io.com                    PMB 181, 11900 Metric Blvd Suite J
http://www.io.com/~pelliott/pme/   Austin TX 78758-3117

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]