|
Boost : |
From: Hamish Mackenzie (boost_at_[hidden])
Date: 2002-02-18 08:41:27
On Mon, 2002-02-18 at 08:05, Hamish Mackenzie wrote:
> I know it is a language extension, so not what you wanted, but my
> preference is for constants to be converted to types by the compiler.
>
> They would become something like
> template< typename Type, Type Value >
> struct constant
> {
> static Type value = Value;
> constant();
> operator const Type & () const { return value; }
Opps Don't let them know your address or you will end up taking up
space. David Abrahams pointed this out to me before and I clean forgot.
operator Type () const { return value; }
> };
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk