Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-28 16:20:39


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

        Note that the current syntax is a legacy
of a lack of consensus. Much more ambitious proposals
where whittled away until this was all that was left
that could be agreed upon. It would have been better, IMHO,
to completely eliminate this as well, since it is so
restricted but verbose.

        Note that (1) is dubious, since C99 introduced VLA's.

-- 
John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net

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