Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-08-02 12:43:34


----- Original Message -----
From: "Jurko" <Jurko_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
To: <boost_at_[hidden]>
Sent: Friday, August 02, 2002 10:37 AM
Subject: [boost] Re: 3-state boolean type

> > That depends on what you mean here.
> >
> > bool b;
> >
> > This doesn't initialize the value for b, and thus would (fuzzily)
suggest
> > what you're saying. However, this:
> >
> > bool b();
> >
> > initializes b to false. So I'd think the default ctor should
initialize
> > the state to false.
>
> Hmmm does this really initialize b to false? Doesn't this declare a
function
> called b taking no parameters and returning a bool value?
>
> Tried it out on BCB5 which said that it was a function declaration.

Sorry, yes, I get bit constantly by this syntactic quirk. I should know
better by now. But what I said still applies. Built in types are zero
initialized when you explicitly initialize them.

Bill Kempf


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