Boost logo

Boost :

From: Miki Jovanovic (miki_at_[hidden])
Date: 2000-05-25 08:45:51


Hi all, hi Dave,

At first I thought that was the way to go. But then I thought of some
examples, how I would implement them, and soon I realised that
classes are a better choice. With namespaces you have to chose
between private members and inlining. Basically, most issues revolve
around protection issues. You cannot make friends etc. All in all, we
probably have to enable both aproaches.

BTW, in response to other messages, this would probably solve the
copy constructor problem:

class noninstantiable : protected noncopyable {
  private:
    noninstantiable(){}
}; // noninstantiable

Cheers,

Miki Jovanovic.

--- In boost_at_[hidden], "David Abrahams" <abrahams_at_m...> wrote:
> In my neck of the woods we call that class "namespace" ;)
> Seriously, why not use a namespace?
>
> ----- Original Message -----
> From: "Peter Nordlund" <peter.nordlund_at_l...>
> To: <boost_at_[hidden]>
> Sent: Thursday, May 25, 2000 5:26 AM
> Subject: [boost] Suggestion to add class nonistantiable to
utility.hpp
>
>
> > Hi all,
> >
> > In the spirit of noncopyable I suggest that the class
> >
> > class noninstantiable {
> > private:
> > noninstantiable(){}
> > }; // noninstantiable
> >
> > is added to utility.hpp.
> >
> > Inherit from this class if your class should not be possible to
> > instantiate.
> > E.g when your class only contain static functions.
> >
> > If someone has a better name to suggest you are wellcome!
> >


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk