Topic: using Base (Was: C++0x)


Author: Valentin.Bonnard@free.fr (Valentin Bonnard)
Date: Fri, 4 May 2001 21:25:06 GMT
Raw View
Dennis Yelle  wrote:

> 2. using Base;
>    Example:
>
>      class Derived : private Base {
>        public:
>        using Base;  // expose the entire public interface of Base.
>        // ...
>      };

1) I read this as:

typedef Base::Base Base;

(I interpret this as useless way to import _one_ name,
Base, in the local scope. Do you really mean

  using Base.*;

?  ;-)

2) Why only the public interface ? Why not all the
members   ? It's inconsistent to only import public
members: C++ constructs don't depend on accessibillity.

  -- VB

---
[ 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.research.att.com/~austern/csc/faq.html                ]