Boost logo

Boost :

Subject: Re: [boost] default value for a variable using template argument
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-11-14 17:19:51


On Fri, Nov 14, 2008 at 13:04, Chris <indy271828_at_[hidden]> wrote:
> Hi, did anyone ever suggest a template class which initializes a variable
> to a certain value? (see example) Is this too trivial?
> This is useful to prevent uninitialized values in objects.
>

It's an interesting idea, but it requires discipline in changing all
the declarations and definitions, so I don't think there's any real
gain since I could just use the discipline to add an initialization to
the definition instead. Overall, I'll stick with -Wuninitialized and
such.

~ Scott


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