|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-06-28 17:13:20
----- Original Message -----
From: "John Max Skaller" <skaller_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, June 28, 2001 5:20 PM
Subject: Re: [boost] BOOST_STATIC_CONSTANT problem
> David Abrahams wrote:
>
> > > Have I missed something?
> >
> > Only that sometimes it's important to carry type information with the
static
> > constant (e.g. in numeric_limits<>). An enum doesn't do that.
>
> I didn't miss that. you missed the SECOND option:
> an out of line value. This should be used in all cases,
> except where an const expression is required, and there
> are only TWO cases where that is necessary that I can think of:
>
> 1) array bounds
> 2) template arguments
BOOST_STATIC_CONSTANT is /only/ used where a compile-time constant is
needed.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk